in a template file login.rhtml: <%= form.password_field :password, :size => 40 %> and i get this error: undefined method `password'' for #<User:0x47e5bcc what is this supposed to mean? and somebody please explain this syntax: Method :password should not it be: Method :password=value? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 5 Dec 2007, at 08:59, wrb wrote:> in a template file login.rhtml: > <%= form.password_field :password, :size => 40 %> > > > and i get this error: > undefined method `password'' for #<User:0x47e5bccIt tried to call the password method on User, but couldn''t.> what is this supposed to mean? > > and somebody please explain this syntax: Method :password > should not it be: Method :password=value?Not sure what you''re trying to ask>--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, Taken at face value, it looks like your User model doesn''t have a password attribute. My reaction would be to check the spelling of the password field in the database table "users" and if that checks out, place a debug debugger breakpoint in the form and have a quick look at the User object. HTH Chris On Dec 5, 8:59 am, wrb <wrb...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> in a template file login.rhtml: > <%= form.password_field :password, :size => 40 %> > > and i get this error: > > undefined method `password'' for #<User:0x47e5bcc > > what is this supposed to mean? > and somebody please explain this syntax: Method :password > should not it be: Method :password=value?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thanks. i tried to debug as you said, it really helps. 2007/12/5, chris.mccauley <chris-8Wqby1sJ1UZCBu1DeFptCw@public.gmane.org>:> > > Hi, > > Taken at face value, it looks like your User model doesn''t have a > password attribute. My reaction would be to check the spelling of the > password field in the database table "users" and if that checks out, > place a debug debugger breakpoint in the form and have a quick look at > the User object. > > HTH > > Chris > > > On Dec 5, 8:59 am, wrb <wrb...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > in a template file login.rhtml: > > <%= form.password_field :password, :size => 40 %> > > > > and i get this error: > > > > undefined method `password'' for #<User:0x47e5bcc > > > > what is this supposed to mean? > > and somebody please explain this syntax: Method :password > > should not it be: Method :password=value? > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---