Skip to content

Loading…

Development mode silent on invalid parameters #66

Open
kwerle opened this Issue · 1 comment

2 participants

@kwerle

It would be nice (as a default option) if development mode was loud about unpermitted parameters.

  Started POST "/users/2"...
  ...
  Parameters: ... POST "user"=>{"first_name"=>"Joe", "last_name"=>"Bob"}
  ...
  params.require(:user).permit(:first, :last)

As a developer I'd like to see this blow up with some meaningful explanation:
"Received unpermitted parameter first_name..."

I'm willing to throw some time at this if it seems like a reasonable idea.

@sevenseacat

+1 to this idea, I can very easily see the scenario where fields are added to a form, the controllers don't get updated, and the data is just silently lost. With attr_accessible, it would throw a mass assignment exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.