We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b5fb6e2 + 8c05de0 commit f2496f1Copy full SHA for f2496f1
lib/replicate/active_record.rb
@@ -269,7 +269,11 @@ def replicate_find_existing_record(attributes)
269
replicate_natural_key.each do |attribute_name|
270
conditions[attribute_name] = attributes[attribute_name.to_s]
271
end
272
- find(:first, :conditions => conditions)
+ if ::ActiveRecord::VERSION::MAJOR >= 4
273
+ where(conditions).first
274
+ else
275
+ find(:first, :conditions => conditions)
276
+ end
277
278
279
# Update an AR object's attributes and persist to the database without
0 commit comments