Module: Trailblazer::V1_1::Operation::Representer

Includes:
Deserializer::JSON, Rendering
Defined in:
lib/trailblazer/1.1/operation/representer.rb

Overview

Including this will change the way deserialization in #validate works.

Instead of treating params as a hash and letting the form object deserialize it, a representer will be infered from the contract. This representer is then passed as deserializer into Form#validate.

TODO: so far, we only support JSON, but it's two lines to change to support any kind of format.

Defined Under Namespace

Modules: DSL, Deserializer, Rendering

Class Method Summary collapse

Methods included from Deserializer::JSON

#validate_contract

Methods included from Rendering

#represented, #to_json

Class Method Details

.included(base) ⇒ Object


9
10
11
# File 'lib/trailblazer/1.1/operation/representer.rb', line 9

def self.included(base)
  base.extend DSL
end