Change sort order of ordergroups to ascending

Since we sort usually sort list ascending it seams strange to do this
different for ordergroups. So align the sort order with the other lists.
This commit is contained in:
Patrick Gansterer 2016-02-17 23:58:53 +01:00 committed by wvengen
parent 460cf1e82c
commit 273969ac90

View file

@ -1,7 +1,7 @@
class Foodcoop::OrdergroupsController < ApplicationController class Foodcoop::OrdergroupsController < ApplicationController
def index def index
@ordergroups = Ordergroup.undeleted.order('name DESC') @ordergroups = Ordergroup.undeleted.order('name')
unless params[:name].blank? # Search by name unless params[:name].blank? # Search by name
@ordergroups = @ordergroups.where('name LIKE ?', "%#{params[:name]}%") @ordergroups = @ordergroups.where('name LIKE ?', "%#{params[:name]}%")