##// END OF EJS Templates
Adds a scope for sorting groups....
Jean-Philippe Lang -
r9764:1c825df54929
parent child
Show More
@@ -25,7 +25,7 class GroupsController < ApplicationController
25 25 helper :custom_fields
26 26
27 27 def index
28 @groups = Group.find(:all, :order => 'lastname')
28 @groups = Group.sorted.all
29 29
30 30 respond_to do |format|
31 31 format.html
@@ -29,6 +29,8 class Group < Principal
29 29
30 30 before_destroy :remove_references_before_destroy
31 31
32 scope :sorted, order("#{table_name}.lastname ASC")
33
32 34 safe_attributes 'name',
33 35 'user_ids',
34 36 'custom_field_values',
General Comments 0
You need to be logged in to leave comments. Login now