Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save roryf/151302 to your computer and use it in GitHub Desktop.

Select an option

Save roryf/151302 to your computer and use it in GitHub Desktop.
# clones foo.notes into bar.notes
foo.notes.each do |note|
new_note = bar.notes.build(note.attributes)
new_note.save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment