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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -