This repository has been archived by the owner. It is now read-only.

Development mode silent on invalid parameters #66

Open
kwerle opened this Issue Dec 7, 2012 · 1 comment

Comments

Projects
None yet
2 participants

kwerle commented Dec 7, 2012

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.

+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 subscribe to this conversation on GitHub. Already have an account? Sign in.