Class: EntityRequest

Inherits:
Object
  • Object
show all
Defined in:
app/serializers/entity_request.rb

Instance Method Summary collapse

Constructor Details

#initialize(parameters) ⇒ EntityRequest

We use EntityRequest object to collect parameters and variables from the controller. Because options that are being passed to the entity do appear in each entity object in the chain, we need a way to pass data that is present in the controller (see #20045).



9
10
11
12
13
# File 'app/serializers/entity_request.rb', line 9

def initialize(parameters)
  parameters.each do |key, value|
    define_singleton_method(key) { value }
  end
end