diff options
| author | mo khan <mo@mokhan.ca> | 2013-12-29 21:27:00 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-12-29 21:27:00 -0700 |
| commit | e6f11180a63fe9f7dde36aee0193f73296143d81 (patch) | |
| tree | 62e994854d2300f39bf6751ea6186fdf9d206227 /app/controllers/admin/admin_controller.rb | |
| parent | f603253801205981d9a5cdbd91611f26994e43a6 (diff) | |
extract admin controller.
Diffstat (limited to 'app/controllers/admin/admin_controller.rb')
| -rw-r--r-- | app/controllers/admin/admin_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/admin/admin_controller.rb b/app/controllers/admin/admin_controller.rb new file mode 100644 index 00000000..9b9270cf --- /dev/null +++ b/app/controllers/admin/admin_controller.rb @@ -0,0 +1,11 @@ +module Admin + class AdminController < ApplicationController + before_filter :restrict_access! + + private + + def restrict_access! + redirect_to root_path unless current_user.is_admin? + end + end +end |
