Module: ActiveRecord::Publishable::ClassMethods
- Defined in:
- lib/active_record/publishable.rb
Instance Method Summary collapse
Instance Method Details
#publishable(options = {}) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/active_record/publishable.rb', line 35 def publishable( = {}) Array(.fetch(:on, [:create, :update, :destroy])).each do |verb| after_commit .merge(on: verb) do unless ActiveRecord::Publishable.disabled? publish_action(verb, ) end end end end |