rails/rails — pull request #6384 by ihid (2012-05-18 16:01:16+00:00)
Title: Tidied and standardised text_helper implementations.

I've just made various small changes to the text_helpers file to make it more readable and standardise it a little. The only tiny functionality change is a `===` vs `==` which I've annotated inline.

I've symbolised the keys of the options hash and used `options.fetch(:foobar, x)` instead of `options[:foobar] ||= x` as per discussion at https://groups.google.com/forum/?hl=en&fromgroups#!topic/rubyonrails-core/jjIDHOhqT9E

I'm happy to revert or change any bits that people don't like, but I'm also happy to implement the changes that people do like more widely, just to try and standardise the style as much as possible. It just takes less brain cycles if the code all looks the same.

I hope it's helpful.