Skip to content
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

With position #119

Closed
wants to merge 4 commits into from
Closed

With position #119

wants to merge 4 commits into from

Conversation

zlotnika
Copy link

@zlotnika zlotnika commented Mar 7, 2017

This adds a class method

Duck.rank(:swimming_order).with_swimming_order_position

It is meant to be used when serializing a collection with its order. It sets the swimming_order_position of each item in the array. The only drawbacks are that you cannot chain queries after it (it returns an array, not an ActiveRecord object), and that it does the ordering in ruby (not SQL), and that It also won't paginate super nicely (this gem doesn't really do that anyway, so that's fine). Also, I couldn't get the tests running locally, so I didn't add any. Feel free to add some.

This should solve #70, #116, #10

@Liooo
Copy link

Liooo commented Mar 28, 2017

@zlotnika Thanks I was lookin for this

@mixonic Any plan to accept this PR?

@brendon
Copy link
Owner

brendon commented Jun 4, 2024

Closing due to inactivity and no tests.

@brendon brendon closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants