How to use params.fetch strong parameters

but I’m not sure how to use the fetch method for this

Simple. You do not use fetch for this. Since you didn’t provide any properties when you created the scaffold, rails didn’t know what to put into permit section and generated that code, most sensible for this situation. When you add some fields to your kitten form, upgrade kitten_params to the normal strong params “shape”.

params.require(:kitten).permit(:name, :age)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)