Permalink
Browse files

Fix failing test

  • Loading branch information...
1 parent bf1298d commit d71f340064e4000675b0004da3f1b79c7dd4da11 @oriolgual oriolgual committed Apr 13, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/resort.rb
View
@@ -154,7 +154,9 @@ def prepend
return if first?
if _siblings.count > 0
delete_from_list
- _siblings.where(:first => true).first.append_to(self)
+ old_first = self.class.first_in_order
+ self.update_attribute(:next_id, old_first.id)
+ old_first.update_attribute(:first, false)
end
self.update_attribute(:first, true)
end

0 comments on commit d71f340

Please sign in to comment.