I am using the ransack gem for my rails app and have a problem with multiselect. I have a job and a company model, a company has many jobs, a job belongs to a company. I want to perform a search on jobs so people can see jobs from specific companies, I have done some research and apparently this should work in the search form:
= search_form_for @q do |f|
= f.collection_select :company_name_cont, Company.all, :id, :name, {:multiple => true}, class: 'chosen-it'
= f.submit "search"
So in the view I get the list (with autocomplete from the chosen gem) but when I click on search it returns no result and I can't select multiple companies.
However, when I use a search field instead like this:
= f.search_field :company_name_cont
The search works.
Could you help me guys
Thanks a lot