Add an AdminController base class for Admin controllers
Handles stuff that's shared across admin controllers.
This commit is contained in:
parent
83f24de352
commit
925183ed7a
9 changed files with 27 additions and 44 deletions
|
@ -1,8 +1,4 @@
|
|||
class Admin::HooksController < ApplicationController
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :authenticate_admin!
|
||||
|
||||
class Admin::HooksController < AdminController
|
||||
def index
|
||||
@hooks = SystemHook.all
|
||||
@hook = SystemHook.new
|
||||
|
@ -15,7 +11,7 @@ class Admin::HooksController < ApplicationController
|
|||
redirect_to admin_hooks_path, notice: 'Hook was successfully created.'
|
||||
else
|
||||
@hooks = SystemHook.all
|
||||
render :index
|
||||
render :index
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue