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

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -