Flowdock
method

retrieve_variable

Importance_0
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: PartialRenderer
retrieve_variable(path, as) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_view/renderer/partial_renderer.rb, line 474
    def retrieve_variable(path, as)
      variable = as || begin
        base = path[-1] == "/" ? "" : File.basename(path)
        raise_invalid_identifier(path) unless base =~ /\A_?([a-z]\w*)(\.\w+)*\z/
        $1.to_sym
      end
      variable_counter = :"#{variable}_counter" if @collection
      [variable, variable_counter]
    end
Register or log in to add new notes.