Permalink
Browse files

Add config.active_support for future configuration options. Also, add…

… more new Rails 3 config settings to new_rails_defaults.rb [rick]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 1eb57a6 commit e0402fe0329fb4f631f49ddee466caace8ece192 @technoweenie technoweenie committed Apr 1, 2008
Showing with 15 additions and 0 deletions.
  1. +2 −0 railties/CHANGELOG
  2. +6 −0 railties/configs/initializers/new_rails_defaults.rb
  3. +7 −0 railties/lib/initializer.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Add config.active_support for future configuration options. Also, add more new Rails 3 config settings to new_rails_defaults.rb [rick]
+
* Add Rails.logger, Rails.root, Rails.env and Rails.cache shortcuts for RAILS_* constants [pratik]
* Allow files in plugins to be reloaded like the rest of the application. [rick]
@@ -3,3 +3,9 @@
# Only save the attributes that have changed since the record was loaded.
ActiveRecord::Base.partial_updates = true
+
+# Include ActiveRecord class name as root for JSON serialized output.
+ActiveRecord::Base.include_root_in_json = true
+
+# Use ISO 8601 format for JSON serialized times and dates
+ActiveSupport.use_standard_json_time_format = true
@@ -416,6 +416,9 @@ def initialize_framework_settings
base_class.send("#{setting}=", value)
end
end
+ configuration.active_support.each do |setting, value|
+ ActiveSupport.send("#{setting}=", value)
+ end
end
# Fires the user-supplied after_initialize block (Configuration#after_initialize)
@@ -461,6 +464,9 @@ class Configuration
# A stub for setting options on ActiveRecord::Base
attr_accessor :active_resource
+ # A stub for setting optinos on ActiveSupport
+ attr_accessor :active_support
+
# Whether or not classes should be cached (set to false if you want
# application classes to be reloaded on each request)
attr_accessor :cache_classes
@@ -609,6 +615,7 @@ def initialize
for framework in default_frameworks
self.send("#{framework}=", Rails::OrderedOptions.new)
end
+ self.active_support = Rails::OrderedOptions.new
end
# Set the root_path to RAILS_ROOT and canonicalize it.

0 comments on commit e0402fe

Please sign in to comment.