Sha256: d6ea0f26e4e414fc9c81dc062ba7e05f38d88db318492688467673a247743b6c
Contents?: true
Size: 685 Bytes
Versions: 69
Compression:
Stored size: 685 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 private def attribute_names_for_serialization attribute_names end end end
Version data entries
69 entries across 68 versions & 8 rubygems