Sha256: fde32ce7cabf88db963658b8958c393abdece04287415dcf70ea5babd2f82734

Contents?: true

Size: 478 Bytes

Versions: 21

Compression:

Stored size: 478 Bytes

Contents

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

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/serialization.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/serialization.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/serialization.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/serialization.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/serialization.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/serialization.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/serialization.rb
abaci-0.3.0 vendor/bundle/gems/activerecord-5.0.0/lib/active_record/serialization.rb
activerecord-5.0.1 lib/active_record/serialization.rb
activerecord-5.0.1.rc2 lib/active_record/serialization.rb
activerecord-5.0.1.rc1 lib/active_record/serialization.rb
activerecord-5.0.0.1 lib/active_record/serialization.rb
activerecord-5.0.0 lib/active_record/serialization.rb
activerecord-5.0.0.rc2 lib/active_record/serialization.rb
activerecord-5.0.0.racecar1 lib/active_record/serialization.rb
activerecord-5.0.0.rc1 lib/active_record/serialization.rb
activerecord-5.0.0.beta4 lib/active_record/serialization.rb
activerecord-5.0.0.beta3 lib/active_record/serialization.rb
activerecord-5.0.0.beta2 lib/active_record/serialization.rb
activerecord-5.0.0.beta1.1 lib/active_record/serialization.rb