Module: Trailblazer::Operation::CRUD

Extended by:
Included
Defined in:
lib/trailblazer/operation/crud.rb

Overview

The CRUD module will automatically create/find models for the configured action. It adds a public Operation#model reader to access the model (after performing).

Defined Under Namespace

Modules: ActiveModel, ClassMethods, Included

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Included

included

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



6
7
8
# File 'lib/trailblazer/operation/crud.rb', line 6

def model
  @model
end

Instance Method Details

#validate(params, *args) ⇒ Object

#validate no longer accepts a model since this module instantiates it for you.



42
43
44
# File 'lib/trailblazer/operation/crud.rb', line 42

def validate(params, *args)
  super(params, @model, *args)
end