title: Rejecting extra url parameters from params hash in rails
body: <p>I am building an API using rails that can take quite a few parameters. Ideally, if the user includes an extra, unnecessary paramater in the request by accident which does not make the request ambiguous I would like to process it as normal. This obviously prevents me from simply writing </p>
  
  <pre><code>  ApiRequest.new(params)
  </code></pre>
  
  <p>since an UnknownAttributeError will be thrown if there is anything extra in the params hash. Is there a simple way of rejecting the extra attributes or will I have to write a method to manually validate the request before creating a new object. Also, would this be considered bad practise for an API, should I be responding with HTTP 400 if this occurs?</p>
  
  <p>Thanks,
  Tom</p>