public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
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]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1796 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
dhh (author)
Sat Jul 09 22:31:29 -0700 2005
commit  c0f84b117ca08e7959062f17c216060d68d46b0c
tree    071f0109d053794d03b65936bb39c334e3cf3404
parent  14e7c7c21dcffd8f4388883eb241e0cc0ad23bbc
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 *SVN*
0
 
0
+* 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]
0
+
0
 * 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]
0
 
0
 * Correct reflected table name for singular associations. #1688 [court3nay@gmail.com]
...
173
174
175
176
 
177
178
179
...
173
174
175
 
176
177
178
179
0
@@ -173,7 +173,7 @@
0
           end
0
 
0
           def assume_bottom_position
0
- update_attribute(position_column, bottom_position_in_list.to_i + 1)
0
+ update_attribute(position_column, bottom_position_in_list.to_i + 1) unless last?
0
           end
0
   
0
           def assume_top_position

Comments

    No one has commented yet.