Hi,

Assume I'm doing an API in Rails 4 with StrongParameters, and I got a model 
like Pricing, with many Prices.

I want my API to support in one endpoint nested attributes for the Prices 
of a Pricing.

The consumer of the API doesn't care that I am using Rails, so he sends me 
the nested attributes of the Prices as :prices, but Rails is expecting 
:prices_attributes

And I am just wondering if it could be possible to bring extra options on 
Strong Parameters, to rename keys like:

params.permit(:prices, :description, ...)
params.rename(:prices, :prices_attributes)

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to