class ActiveModelSerializers::Model

def initialize(attributes = {})

Parameters:
  • attributes (Hash) --
def initialize(attributes = {})
  attributes ||= {} # protect against nil
  @attributes = attributes.symbolize_keys.with_indifferent_access
  @errors = ActiveModel::Errors.new(self)
  super
end