method

to_json_with_active_support_encoder

rails latest stable - Class: Object

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.2.9) is shown here.

to_json_with_active_support_encoder(options = nil)
public

No documentation available.

# File activesupport/lib/active_support/core_ext/object/json.rb, line 31
    def to_json_with_active_support_encoder(options = nil) # :nodoc:
      if options.is_a?(::JSON::State)
        # Called from JSON.{generate,dump}, forward it to JSON gem's to_json
        self.to_json_without_active_support_encoder(options)
      else
        # to_json is being invoked directly, use ActiveSupport's encoder
        ActiveSupport::JSON.encode(self, options)
      end
    end