Module: Coupler::Models::Jobify
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/coupler/models/jobify.rb', line 4 def self.included(base) base.one_to_many :jobs base.one_to_many(:running_jobs, { :class => "Coupler::Models::Job", :conditions => { :status => 'running' }, :read_only => true }) base.one_to_many(:scheduled_jobs, { :class => "Coupler::Models::Job", :conditions => { :status => 'scheduled' }, :read_only => true }) end |