diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-26 01:08:37 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-11-26 01:08:37 -0800 |
commit | 6599dd907f87875045005c3754fc7fe75c130c3e (patch) | |
tree | a9247d5c9cc5c36ea531036ef0c6702bf8eab0ed /activesupport/lib/active_support/json | |
parent | 44216d577690b91e99a843e341507d3a147a87d8 (diff) | |
download | rails-6599dd907f87875045005c3754fc7fe75c130c3e.tar.gz rails-6599dd907f87875045005c3754fc7fe75c130c3e.tar.bz2 rails-6599dd907f87875045005c3754fc7fe75c130c3e.zip |
Simpler and clearer to just explicitly require the JSON encoders
Diffstat (limited to 'activesupport/lib/active_support/json')
-rw-r--r-- | activesupport/lib/active_support/json/encoding.rb | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index d7caffbab3..aaaa3cdfd2 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -1,12 +1,3 @@ -require 'active_support/json/variable' -require 'active_support/json/encoders/object' # Require explicitly for rdoc. -Dir["#{File.dirname(__FILE__)}/encoders/**/*.rb"].each do |file| - basename = File.basename(file, '.rb') - unless basename == 'object' - require "active_support/json/encoders/#{basename}" - end -end - module ActiveSupport module JSON class CircularReferenceError < StandardError @@ -23,3 +14,18 @@ module ActiveSupport end end end + +require 'active_support/json/variable' +require 'active_support/json/encoders/date' +require 'active_support/json/encoders/date_time' +require 'active_support/json/encoders/enumerable' +require 'active_support/json/encoders/false_class' +require 'active_support/json/encoders/hash' +require 'active_support/json/encoders/nil_class' +require 'active_support/json/encoders/numeric' +require 'active_support/json/encoders/object' +require 'active_support/json/encoders/regexp' +require 'active_support/json/encoders/string' +require 'active_support/json/encoders/symbol' +require 'active_support/json/encoders/time' +require 'active_support/json/encoders/true_class' |