app/controllers/cms/groups_controller.rb in browsercms-3.5.7 vs app/controllers/cms/groups_controller.rb in browsercms-4.0.0.alpha
- old
+ new
@@ -1,28 +1,25 @@
module Cms
-class GroupsController < Cms::ResourceController
- layout 'cms/administration'
-
- check_permissions :administrate
- before_filter :set_menu_section
-
- def index
- @groups = Group.paginate(
- :include => :group_type,
- :page => params[:page],
- :order => params[:order] || "#{Group.table_name}.name")
- end
-
- protected
+ class GroupsController < Cms::ResourceController
+ include Cms::AdminTab
+
+ check_permissions :administrate
+
+ def index
+ @groups = Group.includes(:group_type).paginate(:page => params[:page]).order(params[:order] || :name)
+ end
+
+ protected
def after_create_url
index_url
end
+
def after_update_url
index_url
end
def set_menu_section
@menu_section = 'groups'
end
-
-end
+
+ end
end
\ No newline at end of file