Class: IknowParams::Serializer::JsonWithSchema::Rails

Inherits:
IknowParams::Serializer::JsonWithSchema show all
Defined in:
lib/iknow_params/serializer.rb

Instance Attribute Summary

Attributes inherited from IknowParams::Serializer::JsonWithSchema

#schema

Attributes inherited from IknowParams::Serializer

#clazz

Instance Method Summary collapse

Methods inherited from IknowParams::Serializer::JsonWithSchema

#dump, #matches_type?

Methods inherited from IknowParams::Serializer

#dump, for, for!, json_value?, #matches_type!, #matches_type?, singleton

Constructor Details

#initialize(schema) ⇒ Rails

Returns a new instance of Rails.



293
294
295
# File 'lib/iknow_params/serializer.rb', line 293

def initialize(schema)
  super(schema, validate_schema: !::Rails.env.production?)
end

Instance Method Details

#load(structure) ⇒ Object



297
298
299
# File 'lib/iknow_params/serializer.rb', line 297

def load(structure)
  super(convert_strong_parameters(structure))
end