
[PATCH] dm-is-list #move with :to option is broken
Reported by Brian Terlson | January 2nd, 2009 @ 01:26 PM | in 0.10.0
When you specify a position to move to with :to, the list gets broken.
Example:
%w(rubygems dm-core dm-is-list).each{|r| require r }
DataMapper.setup(:default, 'sqlite3::memory:')
class Todo
include DataMapper::Resource
property :id, Serial
is :list
end
Todo.auto_migrate!
@todo_1 = Todo.create
@todo_2 = Todo.create
@todo_3 = Todo.create
@todo_1.move(:to => 2)
Todo.all.inspect
# => "[#<Todo id=1 position=0>, #<Todo id=2 position=2>, #<Todo id=3 position=3>]"
Comments and changes to this ticket
-
Dan Kubb (dkubb) January 8th, 2009 @ 04:20 AM
- Assigned user set to Sindre Aarsaether
-
Marcio May 21st, 2009 @ 07:44 PM
- Title changed from dm-is-list #move with :to option is broken to [PATCH] dm-is-list #move with :to option is broken
im submmiting a patch (with a little spec) to fix this bug.
-
Martin Gamsjaeger (snusnu) July 9th, 2009 @ 05:30 PM
- Milestone set to 0.10.0
#891 is a more recent discussion of the problems with dm-is-list. I linked to this ticket from over there, so that the patch doesn't get lost if it's still needed.
-
Martin Gamsjaeger (snusnu) July 9th, 2009 @ 07:50 PM
- Assigned user changed from Sindre Aarsaether to Martin Gamsjaeger (snusnu)
- State changed from unconfirmed to accepted
-
Martin Gamsjaeger (snusnu) July 14th, 2009 @ 09:31 AM
- State changed from accepted to resolved
Resolved as of
http://github.com/datamapper/dm-more/commit/e497c24c925223c935c5f2c...
Thx again kematzy!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Attachments
Tags
Referenced by
-
891 [patch] is list #739 also provides a patch for dm-is-list. I haven't actu...