Module: Her::Model::Parse

Extended by:
ActiveSupport::Concern
Included in:
Her::Model
Defined in:
lib/her/model/parse.rb

Overview

This module handles resource data parsing at the model level (after the parsing middleware)

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#to_paramsObject

Convert into a hash of request parameters, based on `include_root_in_json`.

Examples:

@user.to_params
# => { :id => 1, :name => 'John Smith' }


12
13
14
# File 'lib/her/model/parse.rb', line 12

def to_params
  self.class.to_params(self.attributes, self.changes)
end