-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix position when no serial positions #223
Conversation
Conflicts: lib/acts_as_list/active_record/acts/list.rb
@brendon There is one test failing, I think it's random fail, can you restart a build for this pull request ? |
I restarted a build with amend, now it's passing. It was a random fail. |
@@ -174,8 +174,12 @@ def move_lower | |||
return unless lower_item | |||
|
|||
acts_as_list_class.transaction do | |||
lower_item.decrement_position | |||
increment_position | |||
if lower_item.send(position_column) != self.send(position_column) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering with these methods. Do we need the branching here. Could the first branch not handle all situations (i.e. consecutive numbering and non-consecutive?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PoslinskiNet can you answer that ? 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is possible, but didn't want to change the default behaviour, just handle "non-consequence" branch, so consider that as a refactor :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, yes that makes sense.
Thanks @jpalumickas, I just had a couple of queries. If we can settle those then I think this can be merged :) Closes #208 (replaced by this PR). |
Just a note. I have another possibly compatibility-breaking change here: #220 so it might make sense to bump the minor version to 0.8.0 to take both of these two changes into account. At least people will then double-think blindly upgrading. We should probably document these changes in the README with an upgrade message. |
Agree on both counts, version bump and doc updates On Sun, Aug 21, 2016 at 2:13 PM, Brendon Muir notifications@github.com
|
0.8.0 has been released and includes this change. |
Perfect, thanks 👍 |
Nice 👍 |
Opened branch from #208 to fix tests and rebase to master branch.
Can you take a look @brendon ?