collection_check_boxes

collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)
Instance Public methods

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.

doc_ruby_on_rails
2015-06-20 00:00:00
Comments
Leave a Comment

Please login to continue.