Comments (4)
Hi @krazyjakee! That's a question for your specific database rather than for Periscope. For instance, here's the documentation for PostgreSQL: https://www.postgresql.org/docs/9.5/static/queries-order.html
SELECT select_list FROM table_expression ORDER BY sort_expression1 ASC NULLS LAST
Googling around should give you what you want! In a Rails context, you may want to use Arel to build and add the NULLS FIRST/LAST
clause to your query ordering. Good luck!
from periscope.
I am throwing the query parameters into periscopes black box which also handles sorting.
.periscope(request.query_parameters)
Are there no extra options I can pass to ask periscope to tweak the ordering?
EDIT: Update the model. Of course, got it. Thank you for taking the time.
from periscope.
Periscope is only an interface to whatever scopes your model already defines. How your models' scopes handle ordering is a question I can't answer. Periscope will happily use whatever scope you define. If you want to give an example of parameters you're passing in, maybe I can help point you in the right direction.
from periscope.
You're super kind, thank you. It suddenly hit me as it should have hours ago 👯
Still getting used to rails, thank you again.
from periscope.
Related Issues (9)
- Rails support HOT 2
- Rails 4? HOT 7
- Custom method definition ignored if it exists in the ORM HOT 1
- Rails 5 Support HOT 1
- Issue with Column Name HOT 1
- periscope_default_scope HOT 1
- Support for Rails 5.1 HOT 2
- Rails 6 or 7 support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from periscope.