Skip to content

Commit

Permalink
Remove implicit ordering when searching existing row by constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Vasilyev committed Dec 29, 2014
1 parent 92ac270 commit 25881e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/seed-fu/seeder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def seed_record(data)
end

def find_or_initialize_record(data)
@model_class.where(constraint_conditions(data)).first ||
@model_class.where(constraint_conditions(data)).take ||
@model_class.new
end

Expand Down

0 comments on commit 25881e3

Please sign in to comment.