2012-09-16 07:44:54 -04:00
|
|
|
# Provides a base class for Admin controllers to subclass
|
|
|
|
#
|
|
|
|
# Automatically sets the layout and ensures an administrator is logged in
|
2013-01-20 06:20:50 -05:00
|
|
|
class Admin::ApplicationController < ApplicationController
|
2012-09-16 07:44:54 -04:00
|
|
|
layout 'admin'
|
|
|
|
before_filter :authenticate_admin!
|
|
|
|
|
|
|
|
def authenticate_admin!
|
|
|
|
return render_404 unless current_user.is_admin?
|
|
|
|
end
|
|
|
|
end
|