Fixed routing bug on (ex) admin controller.
This commit is contained in:
parent
9a54d8504c
commit
571548dfbc
10 changed files with 9 additions and 15 deletions
10
app/controllers/admin/base_controller.rb
Normal file
10
app/controllers/admin/base_controller.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
class Admin::BaseController < ApplicationController
|
||||
before_filter :authenticate_admin
|
||||
|
||||
def index
|
||||
@user = self.current_user
|
||||
@groups = Group.find(:all, :limit => 10, :order => 'created_on DESC', :conditions => {:deleted_at => nil})
|
||||
@users = User.find(:all, :limit => 10, :order => 'created_on DESC')
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
class Admin::OrdergroupsController < ApplicationController
|
||||
before_filter :authenticate_admin
|
||||
class Admin::OrdergroupsController < Admin::BaseController
|
||||
|
||||
def index
|
||||
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
class Admin::UsersController < ApplicationController
|
||||
before_filter :authenticate_admin
|
||||
filter_parameter_logging :password, :password_confirmation # do not log passwort parameters
|
||||
class Admin::UsersController < Admin::BaseController
|
||||
|
||||
def index
|
||||
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
class Admin::WorkgroupsController < ApplicationController
|
||||
before_filter :authenticate_admin
|
||||
class Admin::WorkgroupsController < Admin::BaseController
|
||||
|
||||
def index
|
||||
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue