RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: lekkerduidelijk
Site: http://lekkerduidelijk.nl
I was trying this in Ruby 2, with Rails 4.
The attr_attributes no longer works. Permitting the :fields_attributes didn't cut it, since there is an unknown number of fields. See this
attr_attributes
:fields_attributes
I ended up permitting all parameters with: params.require(:product_type).permit!
params.require(:product_type).permit!
I know it's not safe to do so. If somebody knows a proper way to validate the product type params I would love to hear it.
I was trying this in Ruby 2, with Rails 4.
The
attr_attributes
no longer works. Permitting the:fields_attributes
didn't cut it, since there is an unknown number of fields. See thisI ended up permitting all parameters with:
params.require(:product_type).permit!
I know it's not safe to do so. If somebody knows a proper way to validate the product type params I would love to hear it.