Sha256: a60c7de0d386a6b166f7af440249adfec1dd7448dee39d7f903fb0fe86637fb7
Contents?: true
Size: 607 Bytes
Versions: 10
Compression:
Stored size: 607 Bytes
Contents
module ActiveModel class Serializer module Type extend ActiveSupport::Concern included do with_options instance_writer: false, instance_reader: true do |serializer| serializer.class_attribute :_type # @api private end extend ActiveSupport::Autoload end module ClassMethods # Set the JSON API type of a serializer. # @example # class AdminAuthorSerializer < ActiveModel::Serializer # type 'authors' def type(type) self._type = type && type.to_s end end end end end
Version data entries
10 entries across 10 versions & 2 rubygems