class ActiveModel::Serializer

def serializable_object(options={})

def serializable_object(options={})
  self.serialization_options = options
  return @wrap_in_array ? [] : nil if @object.nil?
  hash = attributes
  hash.merge! associations(options)
  hash = convert_keys(hash) if key_format.present?
  hash = { :type => type_name(@object), type_name(@object) => hash } if @polymorphic
  @wrap_in_array ? [hash] : hash
end