Ruby on Rails: Skipping 'validate_on_create' statement for seeds

Posted by Jack on Stack Overflow See other posts from Stack Overflow or by Jack
Published on 2010-05-17T02:15:53Z Indexed on 2010/05/17 2:20 UTC
Read the original article Hit count: 300

Filed under:

I have a 'validate_on_create' statement in one of my controllers that I would like all of my seed data to skip. What are some solutions so that the create statement in my seeds file skips this validation. My current solution is commenting out the validation each time I run rake db:seed. Anything a little more clever?

© Stack Overflow or respective owner

Related posts about ruby-on-rails