This is what I have and it gives the error.
validates :uname, :presence => true,
:length => { :maximum => 50 }
puts "The name is set to #{user.uname}"
But without the puts it updates the record into the databse. I think it is
to do with scoping. If have this puts after make salt then I have no
problem
On Wed, Feb 23, 2011 at 9:13 PM, Colin Law <[email protected]> wrote:
> On 23 February 2011 15:03, Bhasker Harihara <[email protected]>
> wrote:
> > Hi,
> >
> > My form_for is loading properly and also storing in the db.
> >
> > My show user is also fine.
> >
> > I just want to do a puts "user name is #{user.name}" this gives me
> >
> > NoMethodError in UsersController#new
> >
> > When I use self.name it give the same error
> >
> > but when I do the same at the console, it works fine. What is that I am
> > missing.
>
> Show us the code that is failing and the full error message and tell
> us which line it is failing on. Then we might be able to help.
>
> Colin
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.