On Jan 13, 9:30 am, Frederick Cheung <[email protected]>
wrote:
> On Jan 13, 4:15 am, Chris Olsen <[email protected]>
> wrote:
>
> > Here is the form.
>
> > - form_tag "/admin/users/password" do
> > %fieldset
> > = form_field("Password", :tip => "required") { password_field
> > :password, nil, :size => 15 }
> > = form_field("Password Confirmation", :tip => "required") {
> > password_field :password_confirmation, nil, :size => 15 }
>
> Looking at the params that are submitted would probably tell you why.
> You're abusing password_field by passing nil as the second argument.
> You could either use form builders, form for etc... use password_field
> properly (ie first parameter is the name of an instance variable, 2nd
> is a method name) or use password_field_tag.
And if you're lucky enough that rails lets you get away with that,
then showing the code that's actually relevant here (ie the model and
its validations) would be useful.
Fred
>
> Fred
>
> > .buttons
> > = submit_tag "Save Password"
> > or
> > = link_to "Cancel", admin_user_path(@user)
>
> > --
> > Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---