instance method
collection_check_boxes
Ruby on Rails 4.2.9
Since v4.0.13Signature
collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
Wraps ActionView::Helpers::FormOptionsHelper#collection_check_boxes for form builders:
<%= form_for @post do |f| %>
<%= f.collection_check_boxes :author_ids, Author.all, :id, :name_with_initial %>
<%= f.submit %>
<% end %>
Please refer to the documentation of the base helper for details.
Parameters
-
methodreq -
collectionreq -
value_methodreq -
text_methodreq -
optionsopt = {} -
html_optionsopt = {} -
blockblock
Source
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 824
def collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
@template.collection_check_boxes(@object_name, method, collection, value_method, text_method, objectify_options(options), @default_options.merge(html_options), &block)
end
Defined in actionview/lib/action_view/helpers/form_options_helper.rb line 824
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::FormBuilder