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?

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?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs