aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/configuring.md
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2014-08-03 15:48:14 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2014-08-03 15:48:14 -0700
commit611849772dd66c2e4d005dcfe153f7ce79a8a7db (patch)
tree11ea0257ad55a967bb749fd440530836c86ae066 /guides/source/configuring.md
parente5632f37f797fd3cc6e2f793d7c73e97a55a8d73 (diff)
downloadrails-611849772dd66c2e4d005dcfe153f7ce79a8a7db.tar.gz
rails-611849772dd66c2e4d005dcfe153f7ce79a8a7db.tar.bz2
rails-611849772dd66c2e4d005dcfe153f7ce79a8a7db.zip
Pull in the custom configuration concept from dhh/custom_configuration
Diffstat (limited to 'guides/source/configuring.md')
-rw-r--r--guides/source/configuring.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index 6e897d1714..305adb0608 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -996,3 +996,24 @@ If you get the above error, you might want to increase the size of connection
pool by incrementing the `pool` option in `database.yml`
NOTE. If you are running in a multi-threaded environment, there could be a chance that several threads may be accessing multiple connections simultaneously. So depending on your current request load, you could very well have multiple threads contending for a limited amount of connections.
+
+
+Custom configuration
+--------------------
+
+You can configure your own code through the Rails configuration object with custom configuration. It works like this:
+
+ ```ruby
+ config.x.payment_processing.schedule = :daily
+ config.x.payment_processing.retries = 3
+ config.x.super_debugger = true
+ ```
+
+These configuration points are then available through the configuration object:
+
+ ```ruby
+ Rails.configuration.x.payment_processing.schedule # => :daily
+ Rails.configuration.x.payment_processing.retries # => 3
+ Rails.configuration.x.super_debugger # => true
+ Rails.configuration.x.super_debugger.not_set # => nil
+ ```