Module: Sequel::Plugins::InputTransformer::InstanceMethods

Defined in:
lib/sequel/plugins/input_transformer.rb

Instance Method Summary collapse

Instance Method Details

#[]=(k, v) ⇒ Object

Transform the input using all of the transformers, except those explicitly skipped, before setting the value in the model object.



70
71
72
73
74
75
# File 'lib/sequel/plugins/input_transformer.rb', line 70

def []=(k, v)
  model.input_transformer_order.each do |transformer_name|
    v = model.input_transformers[transformer_name].call(v) unless model.skip_input_transformer?(transformer_name, k)
  end
  super
end