diff options
author | Yong Bakos <ybakos@humanoriented.com> | 2017-06-23 22:44:55 -0700 |
---|---|---|
committer | Yong Bakos <ybakos@humanoriented.com> | 2017-06-23 22:44:55 -0700 |
commit | 4d433f8d21972d738f625bb4e41065e179ea01a8 (patch) | |
tree | 49fd864acf7d4d2c7332b4b1794811af9c0451f8 | |
parent | 2477e1b5aa66e8308244af17abf56474d4266536 (diff) | |
download | rails-4d433f8d21972d738f625bb4e41065e179ea01a8.tar.gz rails-4d433f8d21972d738f625bb4e41065e179ea01a8.tar.bz2 rails-4d433f8d21972d738f625bb4e41065e179ea01a8.zip |
Guides: Clarify partial local variable naming.
Clarify the partial local variable name as being the same as the name
of the partial, minus the _leading_ underscore.
-rw-r--r-- | guides/source/layouts_and_rendering.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md index caa3d21d23..c96cf61761 100644 --- a/guides/source/layouts_and_rendering.md +++ b/guides/source/layouts_and_rendering.md @@ -1171,7 +1171,7 @@ To pass a local variable to a partial in only specific cases use the `local_assi This way it is possible to use the partial without the need to declare all local variables. -Every partial also has a local variable with the same name as the partial (minus the underscore). You can pass an object in to this local variable via the `:object` option: +Every partial also has a local variable with the same name as the partial (minus the leading underscore). You can pass an object in to this local variable via the `:object` option: ```erb <%= render partial: "customer", object: @new_customer %> |