Module: ActionPubsub::ActiveRecord::Publishable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/action_pubsub/active_record/publishable.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- PUBLISHABLE_EVENTS =
{ :changed => ::ActionPubsub::ActiveRecord::Events::Changed, :updated => ::ActionPubsub::ActiveRecord::Events::Updated, :created => ::ActionPubsub::ActiveRecord::Events::Created, :destroyed => ::ActionPubsub::ActiveRecord::Events::Destroyed }
Instance Method Summary collapse
Instance Method Details
#attributes_hash ⇒ Object
23 24 25 26 27 28 |
# File 'lib/action_pubsub/active_record/publishable.rb', line 23 def attributes_hash hash = self.as_json hash.merge!(:changes => previous_changes) if previous_changes && hash hash.symbolize_keys! if hash hash end |