@@ -25,7 +25,7 class GroupsController < ApplicationController | |||||
25 | helper :custom_fields |
|
25 | helper :custom_fields | |
26 |
|
26 | |||
27 | def index |
|
27 | def index | |
28 | @groups = Group.find(:all, :order => 'lastname') |
|
28 | @groups = Group.sorted.all | |
29 |
|
29 | |||
30 | respond_to do |format| |
|
30 | respond_to do |format| | |
31 | format.html |
|
31 | format.html |
@@ -29,6 +29,8 class Group < Principal | |||||
29 |
|
29 | |||
30 | before_destroy :remove_references_before_destroy |
|
30 | before_destroy :remove_references_before_destroy | |
31 |
|
31 | |||
|
32 | scope :sorted, order("#{table_name}.lastname ASC") | |||
|
33 | ||||
32 | safe_attributes 'name', |
|
34 | safe_attributes 'name', | |
33 | 'user_ids', |
|
35 | 'user_ids', | |
34 | 'custom_field_values', |
|
36 | 'custom_field_values', |
General Comments 0
You need to be logged in to leave comments.
Login now