GitHub User: eljago
yes, after you insert a new field, find the select element and call chosen on it. In my case it was like this:
$('form').on 'click', '.add_fields', (event) -> time = new Date().getTime() regexp = new RegExp($(this).data('id'), 'g') $(this).before($(this).data('fields').replace(regexp, time)) $('fieldset.show_person_role:last .chzn-select').chosen() event.preventDefault()
this is my association:
<fieldset class="show_person_role"> <%= f.association :person, collection: Person.order('people.name ASC').all, :input_html => { :class => "chzn-select" } %> </fieldset>
I add the class chzn-select which is used to find the element.
I had the same problem. Found the solution here:
http://ubuntuforums.org/showthread.php?t=1396862
Uninstalled postgresql-common and reinstalled postgresql and libpq-dev
apt-get purge postgresql-common postgresql libpq-dev apt-get install postgresql libpq-dev
Great episode. I'm new to rails and so happy I subscribed.
yes, after you insert a new field, find the select element and call chosen on it.
In my case it was like this:
this is my association:
I add the class chzn-select which is used to find the element.
I had the same problem. Found the solution here:
http://ubuntuforums.org/showthread.php?t=1396862
Uninstalled postgresql-common and reinstalled postgresql and libpq-dev
apt-get purge postgresql-common postgresql libpq-dev
apt-get install postgresql libpq-dev
Great episode.
I'm new to rails and so happy I subscribed.