1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

2 commits

Author SHA1 Message Date
Kevin Deisz
4a13f8ad4f
Properly support reverse_order on relations with nulls_first or nulls_last calls
If you're using the `nulls_first` or `nulls_last` functionality with an explicit ordering, then previously it wasn't properly handling calls to `#reverse` (called through `reverse_order`). This commit changes the behavior to match what would be expected.
2020-09-08 11:20:46 -04:00
Kevin Deisz
66b19b5dec
Allow #nulls_first and #nulls_last in PostgreSQL
When using PostgreSQL, it's useful to be able to specify NULLS FIRST and NULLS LAST on ordered columns. With this commit you can do that now, as in:

```ruby
User.arel_table[:first_name].desc.nulls_last
```
2019-12-31 15:59:59 -05:00