mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
Better flash messages, sessions spec
This commit is contained in:
parent
662806d8c9
commit
482d77c319
12 changed files with 77 additions and 8 deletions
7
app/controllers/admin_controller.rb
Normal file
7
app/controllers/admin_controller.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class AdminController < ApplicationController
|
||||
before_action :verify_admin
|
||||
|
||||
def verify_admin
|
||||
redirect_to client_root_path unless current_user.try(:admin?)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue