Josh Kieschnick
2006-Jul-19 22:45 UTC
[Rails] record validation based on controller method
i have an app i''m working on right now that has "jobs" that need to be created in a queue. then there is another form for a user to go in and complete these jobs. when it is completed, i want the users to be required to add notes to the job before it is completed. is there any easy way to perform validations on a record just from one controller action or method? -- Posted via http://www.ruby-forum.com/.
Josh Kieschnick
2006-Jul-19 22:48 UTC
[Rails] Re: record validation based on controller method
just as i was posting this, i saw something in the api: class Person < ActiveRecord::Base validates_numericality_of :value, :on => :create end is the :on what i''m looking for? can it be used for all of the validation methods? and can i pass more than one action to it? -- Posted via http://www.ruby-forum.com/.