Include a hidden field tag in the form to make sure something gets submitted when none of the check boxes are selected. This should work, after the <%end%>:
<%= hidden_field_tag "user[company_ids][]" %>
More Related Contents:
- How can I rename a database column in a Ruby on Rails migration?
- How to get a random number in Ruby
- Why do routes with a dot in a parameter fail to match?
- Repairing Postgresql after upgrading to OSX 10.7 Lion
- PG::Error: SELECT DISTINCT, ORDER BY expressions must appear in select list
- Best way to create unique token in Rails?
- When to use a “has_many :through” relation in Rails?
- Ruby on Rails 3: Streaming data through Rails to client
- rake db:schema:load vs. migrations
- ActiveRecord Find By Year, Day or Month on a Date field
- How to fix the uninitialized constant Rake::DSL problem on Heroku?
- Rails 3: Multiple Select with has_many through associations
- Rails 3 SQLite3 Boolean false
- What is the replacement for ActionController::Base.relative_url_root?
- Rails 3 submit a form with multiple records
- How to match accented characters with a regex?
- Delete link sends “Get” instead of “Delete” in Rails 3 view
- f.error_messages in Rails 3.0
- Rails Routes based on condition
- Convert UTC to local time in Rails 3
- Scope with join on :has_many :through association
- Remote mysql database on Heroku app
- How to implement bulk insert in Rails 3
- Ruby on rails 4 app does not work in iframe
- Rendering partial in js.erb file
- Rails 3 – Speed up Console Loading Time
- Rails 3.1 include_root_in_json
- Where to put Global variables in Rails 3
- Rails: Order with nulls last
- Why should we avoid using class variables @@ in rails?