When using rails g scaffold kittens
the strong parameters function, kitten_params
is
def kitten_params
params.fetch(:kitten, {})
end
I am familiar with strong parameters,
params.require(:kitten).permit(:name, :age)
but I'm not sure how to use the fetch
method for this.
fetch
, whereas if I DID pass properties, it would userequire
andpermit
– Contestant