summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/acts_as_list/lib/active_record/acts/list.rb14
1 files changed, 14 insertions, 0 deletions
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