Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed that assume_bottom_position (in acts_as_list) could be called o…

…n items already last in the list and they would move one position away from the list #1648 [tyler@kianta.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1796 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit c0f84b117ca08e7959062f17c216060d68d46b0c 1 parent 14e7c7c
@dhh dhh authored
View
2  activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed that assume_bottom_position (in acts_as_list) could be called on items already last in the list and they would move one position away from the list #1648 [tyler@kianta.com]
+
* Added ActiveRecord::Base.threaded_connections flag to turn off 1-connection per thread (required for thread safety). By default it's on, but WEBrick in Rails need it off #1685 [Sam Stephenson]
* Correct reflected table name for singular associations. #1688 [court3nay@gmail.com]
View
2  activerecord/lib/active_record/acts/list.rb
@@ -173,7 +173,7 @@ def bottom_item
end
def assume_bottom_position
- update_attribute(position_column, bottom_position_in_list.to_i + 1)
+ update_attribute(position_column, bottom_position_in_list.to_i + 1) unless last?
end
def assume_top_position
Please sign in to comment.
Something went wrong with that request. Please try again.