I changed the variables @layouts, @partials and @templates to be prefixed with an underscore. The rails tests pass but of course this could make an impact on test cases, which use these internal variables (I don't hope these kind of tests exist though ;)
@steveklabnik, @rafaelfranca please have a look. I noticed that there are more internal variables. Should they be prefixed too? I don't think we should try to minimize naming conflicts as much as possible. The current list is:
INTERNAL_IVARS = [
@rafaelfranca rebased and added a CHANGELOG entry for this one too.
prefix TemplateAssertions ivars (#7459)
@senny it seems fine. I don't know about all these variables but one in special took me attention. We have both @_routes and @route in that array. Could you investigate?
I'm merging this now. Thanks.
@rafaelfranca thanks, I'll have a look at the routing variables.
@rafaelfranca I did some research on @routes and @_routes. Currently they are both needed and serve the following purpose:
I could submit a PR to rename @routes to @_route_set. What do you think?
I just noticed that @routes is accessed from everywhere in the tests. I think we should not touch this code.
hmm. So I think we can't do anything :(
At least for now... yay encapsulation! :(
Revert "Merge pull request #7797 from senny/7459_prefix_tempalte_asse…
This reverts commit 2bad605.
Reason: This added a regression related with shoulda-matchers, since it
is expecting the instance variable @layouts
This will introduce back #7459 but this stable release will be backward compatible.
Related with #8068.