Vote #78316
未完了Redmine patch for Rails breaks functionality of select_tag
0%
説明
The Redmine patch in @config/initializers/10-patches.rb@ breaks the functionality of @ActionView::Helpers::FormTagHelper::select_tag@, which states in the Rails documentation:
:include_blank - If set to true, an empty option will be created. If set to a string, the string will be used as the option’s content and the value will be empty. [...] select_tag "people", options_from_collection_for_select(@people, "id", "name"), include_blank: "All" # =>
With the patch a string value given for @:include_blank@ is not taken into account for the resulting option which will be @ @ unless the option @:prompt@ is given.
This means the above example will result in
select_tag "people", options_from_collection_for_select(@people, "id", "name"), include_blank: "All" # =>
PS: I did not check but this is possibly similar for the other patches trying to correct the invalid @@
My Redmine environment:
- Redmine version 3.3.2.stable.16377
- Ruby version 2.3.1-p112 (2016-04-26) [x86_64-linux-gnu]
- Rails version 4.2.7.1
- Environment production
- Database adapter Mysql2