1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/info_controller.rb
Rafael Mendonça França 6c5f43bab8 Deprecate all *_filter callbacks in favor of *_action callbacks
This is the continuation of the work started at
9d62e04838
2014-05-27 19:10:14 -03:00

23 lines
588 B
Ruby

require 'rails/application_controller'
require 'action_dispatch/routing/inspector'
class Rails::InfoController < Rails::ApplicationController # :nodoc:
prepend_view_path ActionDispatch::DebugExceptions::RESCUES_TEMPLATE_PATH
layout -> { request.xhr? ? false : 'application' }
before_action :require_local!
def index
redirect_to action: :routes
end
def properties
@info = Rails::Info.to_html
@page_title = 'Properties'
end
def routes
@routes_inspector = ActionDispatch::Routing::RoutesInspector.new(_routes.routes)
@page_title = 'Routes'
end
end