FormHelper needs a read method, too. You can return a blank string if
you like but you need to respond_to the field name in question.

You're most likely doing something that's not playing nicely with this
commit's change to value_before_type_cast:

http://github.com/rails/rails/commit/fb0bd8c1092db51888ec4bb72af6c595e13c31fa

On Aug 27, 2010, at 4:55 AM, Oliver Eilhard <oliver.eilh...@gmail.com> wrote:

> Hi!
>
> Until recently I used a User model with a write-only password field on
> it. The idea is to pick that cleartext password up, perform some
> salting and hashing on it and then write that to the database. So my
> model used a method like this:
>
> def password=(cleartext_password)
>  @password = cleartext_password
> end
>
> Worked fine in combination with form_for and
> f.password_field :password. But RC2 changed that and now complains
> about missing method password_before_type_cast. The only workaround
> I've found is to implement that method. (See
> https://rails.lighthouseapp.com/projects/8994/tickets/5471-formhelper-problem-with-write-only-fields
> for a diff with a failing test in actionpack.)
>
> Can anybody shed some light on this?
>
> Thank you,
> Oliver
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Core" group.
> To post to this group, send email to rubyonrails-c...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-core+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-core?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-c...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to