instance method
retrieve_variable
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v6.0.6 PrivateSignature
retrieve_variable(path)
No documentation comment.
Parameters
-
pathreq
Source
# File actionpack/lib/action_view/renderer/partial_renderer.rb, line 409
def retrieve_variable(path)
variable = @options.fetch(:as) { path[%r'_?(\w+)(\.\w+)*$', 1] }.try(:to_sym)
variable_counter = :"#{variable}_counter" if @collection
[variable, variable_counter]
end
Defined in actionpack/lib/action_view/renderer/partial_renderer.rb line 409
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::PartialRenderer