mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
5b2eb64ceb
This reverts commit 8896b4fdc8
.
Conflicts:
activemodel/lib/active_model.rb
activemodel/lib/active_model/serializable.rb
activemodel/lib/active_model/serializer.rb
activemodel/test/cases/serializer_test.rb
18 lines
481 B
Ruby
18 lines
481 B
Ruby
module ActiveRecord #:nodoc:
|
|
# = Active Record Serialization
|
|
module Serialization
|
|
extend ActiveSupport::Concern
|
|
include ActiveModel::Serializers::JSON
|
|
|
|
def serializable_hash(options = nil)
|
|
options = options.try(:clone) || {}
|
|
|
|
options[:except] = Array.wrap(options[:except]).map { |n| n.to_s }
|
|
options[:except] |= Array.wrap(self.class.inheritance_column)
|
|
|
|
super(options)
|
|
end
|
|
end
|
|
end
|
|
|
|
require 'active_record/serializers/xml_serializer'
|