aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-03-28 23:51:34 -0700
committerJosé Valim <jose.valim@gmail.com>2012-03-28 23:51:34 -0700
commite51322a34b740a4ad3b651345e2420912fe2a15f (patch)
treec9d93d3933893f04534b5810a806b1dcf7e9663e /guides/source
parente83e76eca4e134c91c4c2c1092b41f4483592172 (diff)
parent18d275ada1b23bf07cc51a815385afac6bb2b8cb (diff)
downloadrails-e51322a34b740a4ad3b651345e2420912fe2a15f.tar.gz
rails-e51322a34b740a4ad3b651345e2420912fe2a15f.tar.bz2
rails-e51322a34b740a4ad3b651345e2420912fe2a15f.zip
Merge pull request #5625 from nertzy/prefix_partial_path_with_controller_namespace
Add config option to turn off prefixing partial path with controller namespace
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/configuring.textile11
1 files changed, 9 insertions, 2 deletions
diff --git a/guides/source/configuring.textile b/guides/source/configuring.textile
index 246af587bc..717654d5d8 100644
--- a/guides/source/configuring.textile
+++ b/guides/source/configuring.textile
@@ -354,8 +354,7 @@ h4. Configuring Action Dispatch
h4. Configuring Action View
-There are only a few configuration options for Action View, starting with six on +ActionView::Base+:
-
+<tt>config.action_view</tt> includes a small number of configuration settings:
* +config.action_view.field_error_proc+ provides an HTML generator for displaying errors that come from Active Record. The default is
@@ -397,6 +396,14 @@ And can reference in the view with the following code:
* +config.action_view.embed_authenticity_token_in_remote_forms+ allows you to set the default behavior for +authenticity_token+ in forms with +:remote => true+. By default it's set to false, which means that remote forms will not include +authenticity_token+, which is helpful when you're fragment-caching the form. Remote forms get the authenticity from the +meta+ tag, so embedding is unnecessary unless you support browsers without JavaScript. In such case you can either pass +:authenticity_token => true+ as a form option or set this config setting to +true+
+* +config.action_view.prefix_partial_path_with_controller_namespace+ determines whether or not partials are looked up from a subdirectory in templates rendered from namespaced controllers. For example, consider a controller named +Admin::PostsController+ which renders this template:
+
+<erb>
+<%= render @post %>
+<erb>
+
+The default setting is +true+, which uses the partial at +/admin/posts/_post.erb+. Setting the value to +false+ would render +/posts/_post.erb+, which is the same behavior as rendering from a non-namespaced controller such as +PostsController+.
+
h4. Configuring Action Mailer
There are a number of settings available on +config.action_mailer+: