Sha256: 0b860125313935383d7133e851dacdfd5616f4bfb31c156fd59ab04df2d4c145

Contents?: true

Size: 548 Bytes

Versions: 24

Compression:

Stored size: 548 Bytes

Contents

class Reactor::ResourceActionable::UpdateEvent < Reactor::ResourceActionable::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

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
reactor-0.13.0 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.12.2 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.12.1 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.11.4 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.11.2 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.11.1 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.11.0 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.10.1 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.10.0 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.9 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.8 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.7 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.6 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.5 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.4 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.2 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.1 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.9.0 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.8.3 lib/reactor/controllers/concerns/actions/update_event.rb
reactor-0.8.2 lib/reactor/controllers/concerns/actions/update_event.rb