11175
(-- --)
April 28, 2008, 8:04pm
1
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: </label><input
id="user_username" name="user[username]" size="15" type="text" /></p>
<p class="input_fields"><label>Password: </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
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
rab
(Rob Biedenharn)
April 30, 2008, 10:42pm
7
Send me your pc and I'd take a look
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
11175
(-- --)
May 1, 2008, 4:16am
8
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'
rab
(Rob Biedenharn)
May 1, 2008, 11:44am
9
What Prasad said! (Please don't double-post your issues)
-Rob