From 589320337db0a242f8adb2150996f6d038aaf9ad Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 26 Feb 2009 09:21:41 +0000 Subject: Trackers controller refactoring. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2526 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- vendor/plugins/acts_as_list/lib/active_record/acts/list.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'vendor') diff --git a/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb b/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb index 00d86928d..01b414a1c 100644 --- a/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +++ b/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb @@ -118,6 +118,20 @@ module ActiveRecord assume_top_position end end + + # Move to the given position + def move_to=(pos) + case pos.to_s + when 'highest' + move_to_top + when 'higher' + move_higher + when 'lower' + move_lower + when 'lowest' + move_to_bottom + end + end # Removes the item from the list. def remove_from_list -- cgit v1.2.3