ruby - Rails 4, create multiple objects - how to permit it? -
how permit parameters:
contacts: [ {:value => 'value', :contacts_type => 'contact_type'}, {:value => 'value', :contacts_type => 'contact_type'}, ]
to create many objects controller action in 1 json request?
like below, contacts
array of resources specific attributes value
, contacts_type
:
params.permit(contacts: [:value, :contacts_type])
Comments
Post a Comment