From 4a0695996f78c6fd330f1961d450367fc8fa5406 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 14 Jan 2005 02:12:00 +0000 Subject: Removed silly change caused by inability to grok own code at 3 am git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/acts/list.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/acts/list.rb b/activerecord/lib/active_record/acts/list.rb index 285b371a72..8232ea2852 100644 --- a/activerecord/lib/active_record/acts/list.rb +++ b/activerecord/lib/active_record/acts/list.rb @@ -100,14 +100,6 @@ module ActiveRecord end - def add_to_list_top - increment_positions_on_all_items - end - - def add_to_list_bottom - assume_bottom_position - end - def remove_from_list decrement_positions_on_lower_items end @@ -143,6 +135,14 @@ module ActiveRecord end private + def add_to_list_top + increment_positions_on_all_items + end + + def add_to_list_bottom + self[position_column] = bottom_position_in_list.to_i + 1 + end + # Overwrite this method to define the scope of the list changes def scope_condition() "1" end -- cgit v1.2.3