class Admin::AdminController

Private Instance Methods

require_admin!() click to toggle source
# File lib/voyage/templates/admin_controller.rb, line 8
def require_admin!
  txt = 'You must be an admin to perform that action'
  redirect_to root_path, alert: txt unless current_user.admin?
end