blob: 23dc6465af364a56616b70c68ae079facdf335e0 (
plain) (
tree)
|
|
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)
options = options.try(:clone) || {}
options[:except] = Array(options[:except]).map(&:to_s)
options[:except] |= Array(self.class.inheritance_column)
super(options)
end
end
end
|