It actually defines the partial path using the type of the object (model), rather than the name of the instance variable. So, as long as the type is an article, this will work even if the instance variable is @foo.
See the code ActionController :: RecordIdentifier.partial_path for how the path is computed from the object.
source
share