NoMethodError

I have created a simple login form..........

form is like this.............. <% form_tag :controller => "user", :action => "login_submit" do %> <p class="input_fields"><label>Username: &nbsp;</label><input id="user_username" name="user[username]" size="15" type="text" /></p> <p class="input_fields"><label>Password: &nbsp;</label><input id="user_password" name="user[password]" size="15" type="password" /></p><br clear="all" />

<%= submit_tag "Login"%> <% end %>

Don't use @session, @params etc. They were removed. Use session/params instead.

Fred

That looks like a good form :slight_smile:

Frederick Cheung wrote:

Learn to understand these errors: what line did it occur on. What is the object that is null and why is it null etc... Step through the code with the debugger.

Fred

Frederick Cheung wrote:

Send me your pc and I'd take a look :wink:

Seriously, there's no way that anyone here can help you with so little information. You'll have to work it out on your own or trade excess punctuation for more detail.

-Rob

Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com

HERE IS ONE LOOK OF MY FORM WITH CONTROLLER & MODEL & FORM & DATABASE

HERE IS MY ERROR -----

NoMethodError in UserController#login_submit

undefined method `authenticate' for #<Class:0x36f6cbc>

c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1532:in `method_missing' app/controllers/user_controller.rb:34:in `login_submit'

What Prasad said! (Please don't double-post your issues)

-Rob