Mikel wrote:> I have a migration I am doing which involves a change in column name
> that my model uses for validation.
>
> Part of the migration is changing data in that column, which would
> fail the validation, but will pass the new validation.
>
> Is there anyway I can "turn off validation" inside the migration
for
> the duration of the migration?
>
> I have worked around it... but would be good to know for future ref.
I''m not sure I understand the question, but you can always say...
whatever.save_with_validation(false)
...to skip validation.
--Al Evans
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---