# Sytanx question

**URL:** <https://www.ruby-forum.com/t/sytanx-question/122179>\
**Category:** Rails\
**Created:** [December 5, 2007, 9:59am UTC](https://www.ruby-forum.com/t/sytanx-question/122179 "2007-12-05T09:59:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wrb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/73ab20/32.png) [@wrb](https://www.ruby-forum.com/u/wrb)\
**Post date:** [December 5, 2007, 9:59am UTC](https://www.ruby-forum.com/t/sytanx-question/122179/1 "2007-12-05T09:59:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![wrb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/73ab20/32.png) [@wrb](https://www.ruby-forum.com/u/wrb)\
**Post date:** [December 5, 2007, 10:46am UTC](https://www.ruby-forum.com/t/sytanx-question/122179/2 "2007-12-05T10:46:27Z")

</div>

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:0x47e5bcc  
> It 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

---

<div class="post-metadata">

**Author:** ![wrb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/73ab20/32.png) [@wrb](https://www.ruby-forum.com/u/wrb)\
**Post date:** [December 5, 2007, 10:48am UTC](https://www.ruby-forum.com/t/sytanx-question/122179/3 "2007-12-05T10:48:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wrb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/73ab20/32.png) [@wrb](https://www.ruby-forum.com/u/wrb)\
**Post date:** [December 5, 2007, 11:55am UTC](https://www.ruby-forum.com/t/sytanx-question/122179/4 "2007-12-05T11:55:30Z")

</div>

thanks.  
i tried to debug as you said, it really helps.

2007/12/5, chris.mccauley [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
