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

Rails 6.1 #193

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Rails 6.1 #193

wants to merge 5 commits into from

Conversation

jherdman
Copy link

No description provided.

Smart Listing supports three states for sorting:

1. "asc": ascending order using a given column of a table
2. "desc": descending order using a given column of a table
3. "": default ordering for the table (e.g. if you want to order by
   "name" by default, but allow sorting on "created at", you'd want
   this state to return the table to its default order)

When attempting to use the default ordering _as requested by the user_
Smart Listing would construct a query attribute like this:
`"fulfillment_order_sources.name "` (note extra space at the end).
Rails 6.0 was okay with this, 6.1 is not.
Rails 6.0 is okay with something like this:

    "fulfillment_order_sources.name"

Rails 6.1 is not. You have to parse this first.
@jherdman jherdman closed this Jan 26, 2021
@jherdman jherdman reopened this Jan 26, 2021
@avishekjana
Copy link

@jherdman Have you found any way to use smart_listing in Rails 6?

@jherdman
Copy link
Author

My employer has a fork here https://github.com/PrecisionNutrition/smart_listing. I absolutely do not recommend using our fork. We will change it as need be, but are intending on moving away from Smart Listing ASAP. You're free to lift the code out into your own fork, or even attempt to have it upstreamed should that be possible.

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.

2 participants