aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-04-22 16:48:58 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-04-22 16:48:58 -0700
commit6fee981fa4ea2654f825c58b58327fc15fddf3a6 (patch)
tree1e6f5b94f25e72258cde8aee63fa9f12ba7d476e
parentab321268f86d9013cbd4ecd0b5f46e7b05ec55a9 (diff)
downloadrails-6fee981fa4ea2654f825c58b58327fc15fddf3a6.tar.gz
rails-6fee981fa4ea2654f825c58b58327fc15fddf3a6.tar.bz2
rails-6fee981fa4ea2654f825c58b58327fc15fddf3a6.zip
Opt in to JSON
-rw-r--r--actionpack/lib/action_dispatch/middleware/params_parser.rb2
-rw-r--r--activerecord/lib/active_record/serializers/json_serializer.rb2
-rw-r--r--activeresource/lib/active_resource/formats/json_format.rb2
-rw-r--r--activesupport/lib/active_support.rb1
-rw-r--r--activesupport/test/json/decoding_test.rb1
5 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/params_parser.rb b/actionpack/lib/action_dispatch/middleware/params_parser.rb
index 6df572268c..abaee2829e 100644
--- a/actionpack/lib/action_dispatch/middleware/params_parser.rb
+++ b/actionpack/lib/action_dispatch/middleware/params_parser.rb
@@ -1,3 +1,5 @@
+require 'active_support/json'
+
module ActionDispatch
class ParamsParser
ActionController::Base.param_parsers[Mime::XML] = :xml_simple
diff --git a/activerecord/lib/active_record/serializers/json_serializer.rb b/activerecord/lib/active_record/serializers/json_serializer.rb
index 1fd65ed006..c709c3f1eb 100644
--- a/activerecord/lib/active_record/serializers/json_serializer.rb
+++ b/activerecord/lib/active_record/serializers/json_serializer.rb
@@ -1,3 +1,5 @@
+require 'active_support/json'
+
module ActiveRecord #:nodoc:
module Serialization
def self.included(base)
diff --git a/activeresource/lib/active_resource/formats/json_format.rb b/activeresource/lib/active_resource/formats/json_format.rb
index 1d88fc5f16..101027d99e 100644
--- a/activeresource/lib/active_resource/formats/json_format.rb
+++ b/activeresource/lib/active_resource/formats/json_format.rb
@@ -1,3 +1,5 @@
+require 'active_support/json'
+
module ActiveResource
module Formats
module JsonFormat
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb
index 84bf372163..5392faa993 100644
--- a/activesupport/lib/active_support.rb
+++ b/activesupport/lib/active_support.rb
@@ -52,6 +52,5 @@ end
require 'active_support/vendor'
require 'active_support/dependencies'
-require 'active_support/json'
I18n.load_path << "#{File.dirname(__FILE__)}/active_support/locale/en.yml"
diff --git a/activesupport/test/json/decoding_test.rb b/activesupport/test/json/decoding_test.rb
index 7d8a07654d..9b4b207c88 100644
--- a/activesupport/test/json/decoding_test.rb
+++ b/activesupport/test/json/decoding_test.rb
@@ -1,5 +1,6 @@
# encoding: UTF-8
require 'abstract_unit'
+require 'active_support/json'
class TestJSONDecoding < ActiveSupport::TestCase
TESTS = {