Rails 4 strong parameters
ethicalhack3r opened this issue · 3 comments
I'm using rails3-jquery-autocomplete 1.0.14 with Rails 4.0.4 using strong parameters.
Here is an example of using the autocomplete in my view:
<%= f.label :wordpresses %> <%= f.autocomplete_field :wordpresses, autocomplete_wordpress_version_submits_path, 'data-delimiter' => ',', multiple: true %>
When submitting the form I get this error in my log:
Unpermitted parameters: wordpresses
Even though In have :wordpresses
permitted in submit_params
in my my controller.
This only occurs when I use 'data-delimiter' => ',', multiple: true
, I suspect because we're now submitting an Array instead of a String which Rails 4 can't deal with by default?
Any suggestions on what changes I can make to make this work welcome. :)
I'm just starting to convert my first project over to Rails 4 that is using this gem. So far I have not run into this issue. Did you find a work around?
Unfortunately, I couldn't get it working for me on Rails 4. I decided to use http://loopj.com/jquery-tokeninput/ which met my needs.
Ok; glad to hear you found something that worked for you.