Incidentally reverted fix.
This commit is contained in:
parent
36ce6a956f
commit
e0cd6558b5
|
@ -44,9 +44,9 @@ module Ransack
|
|||
else
|
||||
case Ransack.options[:postgres_fields_sort_option]
|
||||
when :nulls_first
|
||||
scope_or_sort = scope_or_sort.direction == :asc ? ("#{scope_or_sort.to_sql} NULLS FIRST") : ("#{scope_or_sort.to_sql} NULLS LAST")
|
||||
scope_or_sort = scope_or_sort.direction == :asc ? Arel.sql("#{scope_or_sort.to_sql} NULLS FIRST") : Arel.sql("#{scope_or_sort.to_sql} NULLS LAST")
|
||||
when :nulls_last
|
||||
scope_or_sort = scope_or_sort.direction == :asc ? ("#{scope_or_sort.to_sql} NULLS LAST") : ("#{scope_or_sort.to_sql} NULLS FIRST")
|
||||
scope_or_sort = scope_or_sort.direction == :asc ? Arel.sql("#{scope_or_sort.to_sql} NULLS LAST") : Arel.sql("#{scope_or_sort.to_sql} NULLS FIRST")
|
||||
end
|
||||
|
||||
relation = relation.order(scope_or_sort)
|
||||
|
|
Loading…
Reference in New Issue