Heinz Strunk wrote:
[...]
> I've got a similiar problem but need to remove two attributes I only
> need for validation.
> I have my model plus two attributes (current, required) and I want to
> validate these two attributes before saving. I cannot create a new
> instance because it says "unknown attribute current"
>
> I could do @errorcheck_current = params[:activity].delete('current') but
> then I cannot use it in the model for validation. Does anyone know how
> to solve that kind of problem?
Delete the virtual attributes *after* validation, perchance? The
after_validation_* callbacks might help...
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
--
Posted via http://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
-~----------~----~----~----~------~----~------~--~---