Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Escape erb tag in USAGE #155

Open
wants to merge 1 commit into from

1 participant

@tomykaira

Because USAGE is rendered uging ERB by railtie, sample erb tags are evaluated.
This raises exception that logged_in is not defined.

@tomykaira tomykaira Escape erb tag in USAGE
Because USAGE is rendered uging ERB by railtie, sample erb tags are evaluated.
This raises exception that `logged_in` is not defined.
aa3a0c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 17, 2012
  1. @tomykaira

    Escape erb tag in USAGE

    tomykaira authored
    Because USAGE is rendered uging ERB by railtie, sample erb tags are evaluated.
    This raises exception that `logged_in` is not defined.
This page is out of date. Refresh to see the latest.
View
14 lib/generators/nifty/authentication/USAGE
@@ -34,13 +34,13 @@ Methods:
There are several methods generated which you can use in your application.
Here's a common example of what you might add to your layout.
- <% if logged_in? %>
- Welcome <%= current_user.username %>! Not you?
- <%= link_to "Log out", logout_path %>
- <% else %>
- <%= link_to "Sign up", signup_path %> or
- <%= link_to "log in", login_path %>.
- <% end %>
+ <%% if logged_in? %>
+ Welcome <%%= current_user.username %>! Not you?
+ <%%= link_to "Log out", logout_path %>
+ <%% else %%>
+ <%%= link_to "Sign up", signup_path %> or
+ <%%= link_to "log in", login_path %>.
+ <%% end %>
You can also restrict unregistered users from accessing a controller using
a before filter. For example.
View
14 rails_generators/nifty_authentication/USAGE
@@ -34,13 +34,13 @@ Methods:
There are several methods generated which you can use in your application.
Here's a common example of what you might add to your layout.
- <% if logged_in? %>
- Welcome <%= current_user.username %>! Not you?
- <%= link_to "Log out", logout_path %>
- <% else %>
- <%= link_to "Sign up", signup_path %> or
- <%= link_to "log in", login_path %>.
- <% end %>
+ <%% if logged_in? %>
+ Welcome <%%= current_user.username %>! Not you?
+ <%%= link_to "Log out", logout_path %>
+ <%% else %%>
+ <%%= link_to "Sign up", signup_path %> or
+ <%%= link_to "log in", login_path %>.
+ <%% end %>
You can also restrict unregistered users from accessing a controller using
a before filter. For example.
Something went wrong with that request. Please try again.