I have watched Railscast about strong_parameters,
Author suggested to filter out forbidden attributes. And it is really
So, that Railscast's code to filter out forbidden attribute is:
<% if permitted_params.topic_attributes.include? :sticky %>
Using simple_form it can be written like this:
<%= f.input :sticky, :as => :boolean if
It's already too much I think. But it is only one attrbute. For five
It probably can be shortened, but still there is a need to specify some
So maybe simple_form gem is the right place to auto-apply strong_parameters
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.