rails/rails — pull request #4510 by carlosantoniodasilva (2012-01-18 02:57:13+00:00)
Title: ActionView content_tag_for refactoring and improvements

* 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.