Sha256: 7b07620cadafe1b8085ca5f9a2616878610e55e9d74614dfbf88122248b7bd21
Contents?: true
Size: 594 Bytes
Versions: 14
Compression:
Stored size: 594 Bytes
Contents
# frozen_string_literal: true module ActiveRecord # :nodoc: # = Active Record \Serialization module Serialization extend ActiveSupport::Concern include ActiveModel::Serializers::JSON included do self.include_root_in_json = false end def serializable_hash(options = nil) if self.class._has_attribute?(self.class.inheritance_column) options = options ? options.dup : {} options[:except] = Array(options[:except]).map(&:to_s) options[:except] |= Array(self.class.inheritance_column) end super(options) end end end
Version data entries
14 entries across 14 versions & 2 rubygems