1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Rick Olson 2008-04-01 20:35:56 +00:00
parent 1eb57a6870
commit e0402fe032
3 changed files with 15 additions and 0 deletions

View file

@ -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]

View file

@ -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

View file

@ -416,6 +416,9 @@ module Rails
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 @@ module Rails
# 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 @@ module Rails
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.