Sha256: 568a095b83a2432eb3238f776d7df58d9456dca193335ca64e4e06fafc19a042
Contents?: true
Size: 600 Bytes
Versions: 8
Compression:
Stored size: 600 Bytes
Contents
module Reactor module ResourceActionable class UpdateEvent < ActionEvent perform do if actionable_resource.valid? action_event "#{resource_name}_updated", target: actionable_resource, changes: actionable_resource.previous_changes.as_json else action_event "#{resource_name}_update_failed", target: actionable_resource, errors: actionable_resource.errors.as_json, attributes: params[resource_name] end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems