Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9204

Show
Ignore:
Timestamp:
04/01/08 20:35:56 (8 months ago)
Author:
rick
Message:

Add config.active_support for future configuration options. Also, add more new Rails 3 config settings to new_rails_defaults.rb [rick]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/railties/CHANGELOG

    r9180 r9204  
    11*SVN* 
     2 
     3* Add config.active_support for future configuration options.  Also, add more new Rails 3 config settings to new_rails_defaults.rb [rick] 
    24 
    35* Add Rails.logger, Rails.root, Rails.env and Rails.cache shortcuts for RAILS_* constants [pratik] 
  • trunk/railties/configs/initializers/new_rails_defaults.rb

    r9163 r9204  
    44# Only save the attributes that have changed since the record was loaded. 
    55ActiveRecord::Base.partial_updates = true 
     6 
     7# Include ActiveRecord class name as root for JSON serialized output. 
     8ActiveRecord::Base.include_root_in_json = true 
     9 
     10# Use ISO 8601 format for JSON serialized times and dates 
     11ActiveSupport.use_standard_json_time_format = true 
  • trunk/railties/lib/initializer.rb

    r9201 r9204  
    417417        end 
    418418      end 
     419      configuration.active_support.each do |setting, value| 
     420        ActiveSupport.send("#{setting}=", value) 
     421      end 
    419422    end 
    420423 
     
    461464    # A stub for setting options on ActiveRecord::Base 
    462465    attr_accessor :active_resource 
     466 
     467    # A stub for setting optinos on ActiveSupport 
     468    attr_accessor :active_support 
    463469 
    464470    # Whether or not classes should be cached (set to false if you want 
     
    610616        self.send("#{framework}=", Rails::OrderedOptions.new) 
    611617      end 
     618      self.active_support = Rails::OrderedOptions.new 
    612619    end 
    613620