Class: ActivePropagation::Updater

Inherits:
Object
  • Object
show all
Extended by:
PropagaterHelper
Defined in:
lib/active_propagation.rb

Class Method Summary collapse

Methods included from PropagaterHelper

propagated_attributes

Class Method Details

.run(klass_str, model_id, assoc, only) ⇒ Object



88
89
90
91
92
93
94
# File 'lib/active_propagation.rb', line 88

def self.run(klass_str, model_id, assoc, only)
  klass = klass_str.constantize
  model = klass.find(model_id)
  Propagater.new(klass, assoc, model_id).run do |a| 
    a.update(propagated_attributes(model, only))
  end 
end