blob: 3e64eca23945f73075c78f28a1ba895d1b882e93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
module Admin
class AdminController < ApplicationController
layout "admin"
before_filter :restrict_access!
private
def restrict_access!
redirect_to root_path unless current_user.try(:admin?)
end
end
end
|