Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionView content_tag_for refactoring and improvements #4510

Merged
merged 10 commits into from
Jan 18, 2012

Conversation

carlosantoniodasilva
Copy link
Member

  • Make sure content_tag_for does not mutate the options hash.
  • Cleanup content_tag_for helper by removing call to capture and using Array() instead of checking for to_ary.

This pull is partially related to #4341, which I just found out after finishing doing the changes here. I ended up cherry picking @coop's commits and rebasing into my changes to have him as author. The issue he was having with Array() was due to the Post class being used everywhere inside the test suite. Changes to this class coming from some other place were interfering on these tests, making them fail hard. I've fixed that by renaming the class to RecordTagPost - all AP tests are green.

Let me know if something should be improved.
Thanks.

coop and others added 10 commits January 18, 2012 00:43
Only check for options and prefix arguments order once when running
content_tag_for with a collection.
The Post class is created everywhere in the test suite, and due to that
when applying the Array() logic to refactor content_tag_for, some other
change to the Post class was breaking record tag tests.

The solution is to rename the class to not collide with others
already defined in the test suite.
josevalim added a commit that referenced this pull request Jan 18, 2012
ActionView content_tag_for refactoring and improvements
@josevalim josevalim merged commit 2de2ea8 into rails:master Jan 18, 2012
@josevalim
Copy link
Contributor

Merged but please try to squash the commits in next pulls into bigger chunks.

@josevalim josevalim merged commit 8470fc9 into rails:master Jan 18, 2012
@carlosantoniodasilva
Copy link
Member Author

Ok, thanks :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants