Is there any idea not to select the name that is already chosen in token input? For example In first I select mango when I search for m. Next time again when I search for m Mango should not be displayed as mango is already chosen. Is there any idea?
<%= f.text_field :plan_tokens, data: {load: @customer.plans} %>
I have my js like this jQuery ->
$('#customer_plan_tokens').tokenInput '/plans.json'
theme: 'facebook'
prePopulate: $('#customer_plan_tokens').data('load')
where to put preventDuplicates:true. I did try but error arise!
I study this from
http://railscasts.com/episodes/258-token-fields
http://railscasts.com/episodes/258-token-fields-revised