Forum: Ruby on Rails See Rails::Configuration for more options?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-02-15 02:16
In config/environment.rb it states:

# See Rails::Configuration for more options

See where exactly? I can't find any docs for it, not at anyway.

3e0a00153a14c1c242be6f05f10fbdd5?d=identicon&s=25 Andy Smith (Guest)
on 2006-02-15 05:32
(Received via mailing list)
The class Rails::Configuration can be found in the svn repo in
railties/lib/initializer.rb around line 342. I'm not sure why
documentation isn't posted, but you should be able to read the comments
in that class.

So an example of turning off colorized logging the rails 1.0 way would
be to access the ActiveRecord::Base options via 'config.active_record'
in environment.rb. The full line would therefore be:

  config.active_record.colorize_logging = false

There are lists of more classes that can be accessed in this manner in
the Configuration class code.

That's how I understand the workings, but I haven't seen this documented

Hope that helps,

75da740d43c5780539214f24ce1148a6?d=identicon&s=25 Jean Helou (Guest)
on 2006-02-15 11:44
(Received via mailing list)
Actually all the documentation for railties is missing from api, there
must be a reason but still this is sooooo frustrating sometimes.

429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-02-15 12:37
Aahhh.. thanks. Makes sense now. On my system, it's in
/usr/local/lib/ruby/gems/1.8/gems/rails-0.14.2/lib/initializer.rb. Its
main options are:

      self.frameworks                   = default_frameworks
      self.load_paths                   = default_load_paths
      self.log_path                     = default_log_path
      self.log_level                    = default_log_level
      self.view_path                    = default_view_path
      self.controller_paths             = default_controller_paths
      self.cache_classes                = default_cache_classes
      self.breakpoint_server            = default_breakpoint_server
      self.whiny_nils                   = default_whiny_nils
      self.database_configuration_file  =

And you're right - the Configuration class has many other attr_accessors
for other objects like action_view, action_mailer, active_records, etc.

The Configuration class and other classes (like ActiveRecord) have their
attributes documentated in the files, but they apparently didn't make it
to the docs at (I didn't see 'colorize_logging'
there either). Guess we'll have to wade through the source to figure
them out until the docs hopefully include them in the future.

This topic is locked and can not be replied to.