Skip to content

Instantly share code, notes, and snippets.

@baothi
Last active October 12, 2015 15:57
Show Gist options
  • Save baothi/fcc37213085c47c95936 to your computer and use it in GitHub Desktop.
Save baothi/fcc37213085c47c95936 to your computer and use it in GitHub Desktop.
class Admins::ApplicationController < ApplicationController
layout 'layouts/admins'
before_action :authenticate_admin!
# def authenticate_admin!
# return render_404 unless current_user.is_admin?
# end
end
class Admins::HomeAdminController < Admin::ApplicationController
def index
end
end
Rails.application.routes.draw do
namespace :admins do
root :to => 'home_admin#index'
resources :admins
end
root 'home#index'
devise_for :admins
devise_for :users
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment