class ActiveModel::Serializer
def as_json(options={})
Returns a json representation of the serializable
def as_json(options={}) options ||= {} if root = options.fetch(:root, @options.fetch(:root, root_name)) @options[:hash] = hash = {} @options[:unique_values] = {} hash.merge!(root => serializable_hash) include_meta hash hash else serializable_hash end end