2013-12-16 00:52:40 -05:00
|
|
|
require 'rails/application_controller'
|
2012-07-01 23:00:10 -04:00
|
|
|
require 'action_dispatch/routing/inspector'
|
2012-05-22 19:23:17 -04:00
|
|
|
|
2013-12-16 00:52:40 -05:00
|
|
|
class Rails::InfoController < Rails::ApplicationController # :nodoc:
|
2012-12-17 15:26:46 -05:00
|
|
|
prepend_view_path ActionDispatch::DebugExceptions::RESCUES_TEMPLATE_PATH
|
2013-12-16 00:52:40 -05:00
|
|
|
layout -> { request.xhr? ? false : 'application' }
|
2012-05-22 19:23:17 -04:00
|
|
|
|
|
|
|
before_filter :require_local!
|
|
|
|
|
|
|
|
def index
|
2013-01-05 08:52:04 -05:00
|
|
|
redirect_to action: :routes
|
2012-05-22 19:23:17 -04:00
|
|
|
end
|
|
|
|
|
2006-03-29 10:11:47 -05:00
|
|
|
def properties
|
2012-05-22 19:23:17 -04:00
|
|
|
@info = Rails::Info.to_html
|
2013-11-21 20:02:57 -05:00
|
|
|
@page_title = 'Properties'
|
2012-05-22 19:23:17 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def routes
|
2013-01-05 08:48:50 -05:00
|
|
|
@routes_inspector = ActionDispatch::Routing::RoutesInspector.new(_routes.routes)
|
2013-11-21 20:02:57 -05:00
|
|
|
@page_title = 'Routes'
|
2006-03-19 13:45:26 -05:00
|
|
|
end
|
2006-03-29 10:11:47 -05:00
|
|
|
end
|