From 72e973ebbcddbeb172c2dd3a7ddc12957dc5bec0 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Fri, 26 Nov 2010 17:03:14 +1100 Subject: Add mention of after_initialize to the config guide --- railties/guides/source/configuring.textile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'railties/guides/source/configuring.textile') diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile index 3986faa3cd..154eebc0c1 100644 --- a/railties/guides/source/configuring.textile +++ b/railties/guides/source/configuring.textile @@ -39,6 +39,14 @@ Rails will use that particular setting to configure Active Record. h4. Rails General Configuration +* +config.after_initialize+ takes a block which will be ran _after_ Rails has finished initializing. Useful for configuring values set up by other initializers: + + + config.after_initialize do + ActionView::Base.sanitized_allowed_tags.delete 'div' + end + + * +config.autoload_once_paths+ accepts an array of paths from which Rails will automatically load from only once. All elements of this array must also be in +autoload_paths+. * +config.autoload_paths+ accepts an array of additional paths to prepend to the load path. By default, all app, lib, vendor and mock paths are included in this list. -- cgit v1.2.3