Class: Rails::InfoController

Inherits:
ApplicationController show all
Defined in:
railties/lib/rails/info_controller.rb

Overview

:nodoc:

Constant Summary

Constants inherited from ActionController::Base

ActionController::Base::MODULES, ActionController::Base::PROTECTED_IVARS

Constants included from ActionController::ParamsWrapper

ActionController::ParamsWrapper::EXCLUDE_PARAMETERS

Constants included from ActiveSupport::Callbacks

ActiveSupport::Callbacks::CALLBACK_FILTER_TYPES

Constants included from ActionController::DataStreaming

ActionController::DataStreaming::DEFAULT_SEND_FILE_DISPOSITION, ActionController::DataStreaming::DEFAULT_SEND_FILE_TYPE

Constants included from ActionController::Rendering

ActionController::Rendering::RENDER_FORMATS_IN_PRIORITY

Constants included from ActionController::RequestForgeryProtection

ActionController::RequestForgeryProtection::CSRF_TOKEN

Constants included from ActionController::Renderers

ActionController::Renderers::RENDERERS

Constants included from ActionController::Redirecting

ActionController::Redirecting::ILLEGAL_HEADER_VALUE_REGEX

Constants included from AbstractController::Rendering

AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES

Instance Method Summary collapse

Methods inherited from ActionController::Base

without_modules

Methods included from ActiveSupport::Concern

#append_features, #class_methods, extended, #included, #prepend_features, #prepended

Methods included from ActionController::Instrumentation

#initialize, #redirect_to, #render, #send_data, #send_file

Methods included from ActionController::Rescue

#show_detailed_exceptions?

Methods included from ActiveSupport::Rescuable

#handler_for_rescue, #rescue_with_handler

Methods included from ActiveSupport::Callbacks

#run_callbacks

Methods included from ActionController::HttpAuthentication::Token::ControllerMethods

#authenticate_or_request_with_http_token, #authenticate_with_http_token, #request_http_token_authentication

Methods included from ActionController::HttpAuthentication::Digest::ControllerMethods

#authenticate_or_request_with_http_digest, #authenticate_with_http_digest, #request_http_digest_authentication

Methods included from ActionController::HttpAuthentication::Basic::ControllerMethods

#authenticate_or_request_with_http_basic, #authenticate_with_http_basic, #http_basic_authenticate_or_request_with, #request_http_basic_authentication

Methods included from ActionController::Rendering

#render, #render_to_body, #render_to_string

Methods included from AbstractController::Helpers

#_helpers

Methods included from AbstractController::Helpers::Resolution

#all_helpers_from_path, #helper_modules_from_paths, #modules_for_helpers

Methods included from ActionController::RequestForgeryProtection

#commit_csrf_token, #initialize, #reset_csrf_token

Methods included from ActionController::FormBuilder

#default_form_builder

Methods included from ActionController::StrongParameters

#params, #params=

Methods included from ActionController::ImplicitRender

#default_render, #method_for_action

Methods included from ActionController::BasicImplicitRender

#default_render, #send_action

Methods included from ActionController::MimeResponds

#respond_to

Methods included from ActionController::ConditionalGet

#expires_in, #expires_now, #fresh_when, #http_cache_forever, #no_store, #stale?

Methods included from ActionController::Head

#head

Methods included from ActionController::Renderers

#_render_to_body_with_renderer, _render_with_renderer_method_name, add, remove, #render_to_body

Methods included from ActionView::Layouts

#_process_render_template_options, #action_has_layout?, #initialize

Methods included from ActionView::Rendering

#initialize, #process, #render_to_body, #view_context, #view_context_class, #view_renderer

Methods included from ActionView::ViewPaths

#_prefixes, #append_view_path, #details_for_lookup, #lookup_context, #prepend_view_path

Methods included from ActionController::Redirecting

_compute_redirect_to_location, #_compute_redirect_to_location, #redirect_back, #redirect_back_or_to, #redirect_to, #url_from

Methods included from ActionController::UrlFor

#initialize, #url_options

Methods included from AbstractController::UrlFor

#_routes

Methods included from ActionDispatch::Routing::UrlFor

#full_url_for, #initialize, #route_for, #url_for, #url_options

Methods included from ActionDispatch::Routing::PolymorphicRoutes

#polymorphic_path, #polymorphic_url

Methods included from ActionController::Helpers

#helpers

Methods included from AbstractController::Translation

#localize, #translate

Methods included from AbstractController::Rendering

#render, #render_to_body, #render_to_string, #rendered_format, #view_assigns

Methods inherited from ActionController::Metal

action, action_encoding_template, #content_type, #content_type=, #controller_name, controller_name, dispatch, #dispatch, #headers, #initialize, #location, #location=, make_response!, #media_type, middleware, #params, #params=, #performed?, #request, #reset_session, #response, #response=, #response_body=, #session, #set_request!, #set_response!, #status, #status=, #to_a, #url_for, use

Methods included from ActionController::Testing::Functional

#clear_instance_variables_between_requests, #recycle!

Methods inherited from AbstractController::Base

abstract!, action_methods, #action_methods, #action_name, #available_action?, clear_action_methods!, controller_path, #controller_path, eager_load!, #formats, inherited, #inspect, internal_methods, method_added, #performed?, #process, #response_body, supports_path?

Methods included from ActiveSupport::DescendantsTracker

clear, #descendants, descendants, disable_clear!, reject!, subclasses

Methods included from ActiveSupport::Configurable

#config

Instance Method Details

#indexObject



12
13
14
# File 'railties/lib/rails/info_controller.rb', line 12

def index
  redirect_to action: :routes
end

#notesObject



35
36
37
38
39
40
41
# File 'railties/lib/rails/info_controller.rb', line 35

def notes
  @annotations = Rails::SourceAnnotationExtractor.new(
    Rails::SourceAnnotationExtractor::Annotation.tags.join("|")
  ).find(
    Rails::SourceAnnotationExtractor::Annotation.directories
  )
end

#propertiesObject



16
17
18
19
# File 'railties/lib/rails/info_controller.rb', line 16

def properties
  @info = Rails::Info.to_html
  @page_title = "Properties"
end

#routesObject



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'railties/lib/rails/info_controller.rb', line 21

def routes
  if query = params[:query]
    query = URI::RFC2396_PARSER.escape query

    render json: {
      exact: matching_routes(query: query, exact_match: true),
      fuzzy: matching_routes(query: query, exact_match: false)
    }
  else
    @routes_inspector = ActionDispatch::Routing::RoutesInspector.new(_routes.routes)
    @page_title = "Routes"
  end
end