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?
I have a ‘validate_on_create’ statement in one of my controllers that I would like
Share
Have you considered adding an attribute in the model which is checked in the validate_on_create method?
Example: