lib/active_model/serializers/json.rb in activemodel-5.1.7 vs lib/active_model/serializers/json.rb in activemodel-5.2.0.beta1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require "active_support/json" module ActiveModel module Serializers # == Active \Model \JSON \Serializer @@ -8,11 +10,10 @@ include ActiveModel::Serialization included do extend ActiveModel::Naming - class_attribute :include_root_in_json, instance_writer: false - self.include_root_in_json = false + class_attribute :include_root_in_json, instance_writer: false, default: false end # Returns a hash representing the model. Some configuration can be # passed through +options+. #