rails/rails — pull request #13122 by andrielfn (2013-12-01 07:46:50+00:00)
Title: Fix the merge of a label class defined inside the block

In the `collection_check_boxes` and `collection_radio_buttons`, when we try to add a new class defined inside a block to a `label` tag, it will not be merged with de classes already set by the collection.

```erb
<%= form_for @form do |f| %>
<% collection = [[1, true, { class: 'foo' }]] %>
<%= f.collection_check_boxes :options, collection, :second, :first do |b| %>
<%= b.label(class: 'my_custom_class') %>
<% end %>
<% end %>
```

From this code we hope that the label had the both `foo` and `my_custom_class` classes, but it isn't true. Only the `foo` class will be parsed.

This patch fixes this problem.