Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix failing test

  • Loading branch information...
commit d71f340064e4000675b0004da3f1b79c7dd4da11 1 parent bf1298d
@oriolgual oriolgual authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/resort.rb
View
4 lib/resort.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.