Skip to content

Instantly share code, notes, and snippets.

@jlee42
Created November 3, 2012 19:12
Show Gist options
  • Save jlee42/4008321 to your computer and use it in GitHub Desktop.
Save jlee42/4008321 to your computer and use it in GitHub Desktop.
Example of strong_parameters usage with arrays
params.require(:animal).permit(
:name, :description, :trainer_id, :photo_id, :video_id, :tag_list,
trainers_attributes: [:id, :first_name, :last_name, :_destroy]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment