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.
but still i dnt knw how 2 use........if u hav any code for lgoin method
thn pls paste it here.........i m getting prbolm of ..........
NoMethodError
my method is...........
-------------------------------------------------------------------------
def login_submit
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
redirect_to :action => 'welcome'
else
@login = @params['user']['login']
flash.now[:notice] = l(:user_login_failed)
end
end
--------------------------------------------------------------------------
and in the rhtml file the form is..........
<%= submit_tag "Login"%>
<% end %>
--------------------------------------------------------------------------
so can you help mee what is this prblm .............
I remove all the things which you hav said.........
but still the same prblm.........and this code is running fine in my
office pc.
but not working in my home pc.