This is all you need to do for the form: Don’t do it manually when there is a built in helper.
<%= form_for @kennel do |f| %>
<%= f.collection_check_boxes(:handler_ids, Handler.all, :id, :to_s) %>
<% end %>
More Related Contents:
- Boolean Validation
- How is attr_accessible used in Rails 4?
- Nested attributes unpermitted parameters
- Rails: How to reference images in CSS within Rails 4
- How to solve error “Missing `secret_key_base` for ‘production’ environment” (Rails 4.1)
- Rails 4: List of available datatypes
- Disable ActiveRecord for Rails 4
- ActiveRecord OR query Hash notation
- rescue_from ActionController::RoutingError in Rails 4
- Rails 4: before_filter vs. before_action
- Saving enum from select in Rails 4.1
- Add a reference column migration in Rails 4
- Rails 4 image-path, image-url and asset-url no longer work in SCSS files
- Rails 4: organize rails models in sub path without namespacing models?
- Rails update_attributes without save?
- GroupingError: ERROR: column must appear in the GROUP BY clause or be used in an aggregate function
- Rails 4: assets not loading in production
- Rails 4 nested attributes and has_many :through associaton in a form
- Rails 4, how to correctly configure smtp settings (gmail)
- New data not persisting to Rails array column on Postgres
- Form Submit button only works after reload
- Rails I18n validation deprecation warning
- First argument in form cannot contain nil or be empty – Rails 4
- ActionMailer not sending mail in development Rails 4
- strong parameters permit all attributes for nested attributes
- Changing the default date and time format in Rails 4
- Upgrading from Rails 2.3.8 to 4.0
- How to integrate a Wrap Bootstrap theme into an Rails application?
- ActionController::InvalidAuthenticityToken in RegistrationsController#create
- Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432?