Skip to content

Commit

Permalink
Updating documentation for synchronizing unsaved/new instances with i…
Browse files Browse the repository at this point in the history
…mport.

zdennis#16
  • Loading branch information
zdennis committed Apr 6, 2011
1 parent 7958ed1 commit 58b144b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/activerecord-import/import.rb
Expand Up @@ -129,6 +129,11 @@ def supports_on_duplicate_key_update?
# BlogPost.import posts, :synchronize=>[ post ]
# puts post.author_name # => 'yoda'
#
# # Example synchronizing unsaved/new instances in memory by using a uniqued imported field
# posts = [BlogPost.new(:title => "Foo"), BlogPost.new(:title => "Bar")]
# BlogPost.import posts, :synchronize => posts
# puts posts.first.new_record? # => false
#
# == On Duplicate Key Update (MySQL only)
#
# The :on_duplicate_key_update option can be either an Array or a Hash.
Expand Down

0 comments on commit 58b144b

Please sign in to comment.