Sha256: 962b2a827447decca301e4f09ddf241396da68e17139e33b0b8360a37e8b55a9
Contents?: true
Size: 576 Bytes
Versions: 8
Compression:
Stored size: 576 Bytes
Contents
module Reactor module ResourceActionable class CreateEvent < ActionEvent perform do if actionable_resource.valid? action_event "#{resource_name}_created", target: actionable_resource, attributes: params[resource_name] else action_event "#{resource_name}_create_failed", errors: actionable_resource.errors.as_json, attributes: params[resource_name], target: nested_resource end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems