lndl / select2_simple_form

Select2 inputs for SimpleForm
MIT License
25 stars 34 forks source link

Creates a normal select field, even though select2 works when I use it directly. #17

Open amadeuspagel opened 6 years ago

amadeuspagel commented 6 years ago

This is my code:

<%= simple_form_for(Relation.create, remote: true) do |f| %>
  <%= f.hidden_field :dependency_id, :value => @article.id %>
  <%= f.input :dependent_id,
              as: :select2,
              collection: Article.all %>
  <%= f.submit "Add suggestion" %>
<% end %>