Modifying Params Hash

Is there a way to modify the params hash?

I have an external service that is sending requests to me and I can
not control they way they send the request. It is one flat hash and i
would like to take some of values fromt he hash and then create a new
record based on the remaining hash. Basically, i would like to remove
the :action and :controller values as when i try to submit the whole
hash to the actveirecord new method it complains by saying it does not
recognize those as it should not.

Thanks.

tashfeen.ekram wrote:

Is there a way to modify the params hash?

I have an external service that is sending requests to me and I can
not control they way they send the request. It is one flat hash and i
would like to take some of values fromt he hash and then create a new
record based on the remaining hash. Basically, i would like to remove
the :action and :controller values as when i try to submit the whole
hash to the actveirecord new method it complains by saying it does not
recognize those as it should not.

Thanks.

Use delete_if: class Hash - RDoc Documentation