Fix example in doc comment.
This commit is contained in:
parent
9fd19a36bd
commit
d0c1055b65
|
@ -137,8 +137,8 @@ class ActiveRecord::Base
|
||||||
#
|
#
|
||||||
# # Example synchronizing unsaved/new instances in memory by using a uniqued imported field
|
# # Example synchronizing unsaved/new instances in memory by using a uniqued imported field
|
||||||
# posts = [BlogPost.new(:title => "Foo"), BlogPost.new(:title => "Bar")]
|
# posts = [BlogPost.new(:title => "Foo"), BlogPost.new(:title => "Bar")]
|
||||||
# BlogPost.import posts, :synchronize => posts
|
# BlogPost.import posts, :synchronize => posts, :synchronize_keys => [:title]
|
||||||
# puts posts.first.new_record? # => false
|
# puts posts.first.persisted? # => true
|
||||||
#
|
#
|
||||||
# == On Duplicate Key Update (MySQL only)
|
# == On Duplicate Key Update (MySQL only)
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue