Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dashboard::DashboardController.ancestors => [Dashboard::DashboardController, Dashboard::ApplicationController, ApplicationController, ... ] Member::MemberController.ancestors => [Member::MemberController, ApplicationController, ... ]
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
protect_from_forgery
end
# app/controllers/dashboard/application_controller.rb
module Dashboard
class ApplicationController < ::ApplicationController
before_filter :authenticate_user!
end
end
# app/controllers/dashboard/dashboard_controller.rb
module Dashboard
class DashboardController < ApplicationController
def index
end
end
end
# app/controllers/member/application_controller.rb
module Member
class ApplicationController < ::ApplicationController
before_filter :authenticate_user!
end
end
# app/controllers/member/member_controller.rb
module Member
class MemberController < ApplicationController
def index
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment