Module: JSONAPIHelpers::Serializers::Deserializer
- Defined in:
- lib/jsonapi_helpers/serializers/deserializer.rb
Class Method Summary collapse
Class Method Details
.parse(params) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/jsonapi_helpers/serializers/deserializer.rb', line 6 def self.parse(params) # Parse the params hash and "flatten" the structure parsed_params = JSONAPIHelpers.config.deserializer_klass.jsonapi_parse(params) # Pass the hash to a params klass where normal whitelisting of params can be made JSONAPIHelpers.config.params_klass.new(parsed_params || {}) end |