I've read many other related questions and just cannot get this gem to work:
https://github.com/tsechingho/chosen-rails
as the README says, I have
-included *= require chosen in my application.css -included //= require chosen-jquery in my application.js In addition, I have tried adding the followin to the bottom of my application.js file:
jQuery(function($){ $('.chzn-select').chosen(); }); I've also replaced .chzn-select with #user_education_ids and #user_school_ids based on my model and view:
<% @schools = Education.all.map { |e| [ e.school, e.school ] } %> <%= select_tag "school_ids", options_for_select((@schools), params[:education_id]), { :include_blank => true, :multiple => true } %> I've tried adding , :class=>'chzn-select' to the end of :multiple => true, no luck
(A User has many Educations, as well as many schools through educations)
Not sure why this is giving me so much trouble, but it is. Help is very much appreciated!