I have a rails gem that uses a snippet like:
components = []
components << label_for(attribute)
components << ...
components << text_field(attribute)
return components.join
The gem worked fine in Rails 3.0.1, however it escapes (renders as text in a browser) all HTML after updating to Rails 3.0.2. What am I doing something wrong? Thanks.
As @sj26 points out, either use the rails built-in helper:
Or use my
rails_joingem to makeArray#joinhtml-safe aware, in which case your original code will work as is.