I want to comment this line in .rhtml file…how can i do that…
<%#= link_to ‘Create New Book’, :controller => ‘Book’, :action =>
‘list’ %>
<%# this is an erb comment %>
I want to comment this line in .rhtml file…how can i do that…
<%#= link_to ‘Create New Book’, :controller => ‘Book’, :action =>
‘list’ %>
<%# this is an erb comment %>
Well, that’s not really enough to go on. Take a look at the
restful_authentication plugin or follow along with Agile Web
Development with Rails for that kind of thing.
if session[‘user’] @logged_in = true
else @logged_in = false
end @user = User.new(@params[‘user’])
if @session[‘user’] = User.authenticate(@params[‘user’]
[‘username’], @params[‘user’][‘password’])
flash[:notice] = l(:user_login_succeeded)
Where is the l method defined? Is that where your NoMethodError comes
from?
Also, don’t user the @session or @params variables, use the session
and params methods instead:
if session[‘user’] = User.authenticate(params[‘user’][‘username’],
params[‘user’][‘password’])
-Rob
<% form_tag :controller => “user”, :action => “login_submit” do %>