Open sina-s opened 7 years ago
In the docs, an example of strong parameters are given as: params.require(:user).permit(:name, :tag_list) but in order to accept an array of tags in the params, this should be params.require(:user).permit(:name, :tag_list => []) reference: http://edgeguides.rubyonrails.org/action_controller_overview.html#permitted-scalar-values
params.require(:user).permit(:name, :tag_list)
params.require(:user).permit(:name, :tag_list => [])
In the docs, an example of strong parameters are given as:
params.require(:user).permit(:name, :tag_list)
but in order to accept an array of tags in the params, this should beparams.require(:user).permit(:name, :tag_list => [])
reference: http://edgeguides.rubyonrails.org/action_controller_overview.html#permitted-scalar-values