Permalink
Browse files

Make sure the working record set is uniq

  • Loading branch information...
1 parent d25b8c2 commit a50642f6cb556c4fd131936090f27d53eb2c8482 @lifo committed Sep 15, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sidekick/target.rb
View
@@ -10,7 +10,7 @@ def find_target_with_kick
reflection_name = @reflection.name
# Fucking STI
- working_record_set = @owner._parent_record_set.find_all {|r| r.class.reflect_on_association(reflection_name) }
+ working_record_set = @owner._parent_record_set.find_all {|r| r.class.reflect_on_association(reflection_name) }.uniq
# Sorry new records. You don't belong.
working_record_set.each do |r|

0 comments on commit a50642f

Please sign in to comment.