Reverse sort direction for Events

This commit is contained in:
Petko Bordjukov 2016-10-08 21:40:55 +03:00
parent cb63c66652
commit 4f8150090b
1 changed files with 2 additions and 1 deletions

View File

@ -7,5 +7,6 @@ class EventSearch
option(:event_type_id) { |scope, value| scope.where event_type_id: value } option(:event_type_id) { |scope, value| scope.where event_type_id: value }
option(:status) { |scope, value| scope.joins(:proposition).where(propositions: {status: value}) } option(:status) { |scope, value| scope.joins(:proposition).where(propositions: {status: value}) }
sort_by :title sort_by 'title'
config[:defaults]['sort'] = "#{config[:sort_attributes].first} asc"
end end