mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove :api:
tag that has leaked on the doc directly [ci skip]
Currently `:api:` tag has leaked on the doc directly since RDoc doesn't support `:api:` tag directive. http://api.rubyonrails.org/v5.1/classes/AbstractController/Rendering.html So `:api: private` doesn't work as expected. We are using `:nodoc:` for the purpose. Related #13989.
This commit is contained in:
parent
285f9a89d5
commit
5349f23108
6 changed files with 4 additions and 29 deletions
|
@ -180,8 +180,6 @@ module AbstractController
|
|||
#
|
||||
# ==== Parameters
|
||||
# * <tt>name</tt> - The name of an action to be tested
|
||||
#
|
||||
# :api: private
|
||||
def action_method?(name)
|
||||
self.class.action_methods.include?(name)
|
||||
end
|
||||
|
|
|
@ -20,7 +20,6 @@ module AbstractController
|
|||
|
||||
# Normalizes arguments, options and then delegates render_to_body and
|
||||
# sticks the result in <tt>self.response_body</tt>.
|
||||
# :api: public
|
||||
def render(*args, &block)
|
||||
options = _normalize_render(*args, &block)
|
||||
rendered_body = render_to_body(options)
|
||||
|
@ -42,19 +41,16 @@ module AbstractController
|
|||
# (as ActionController extends it to be anything that
|
||||
# responds to the method each), this method needs to be
|
||||
# overridden in order to still return a string.
|
||||
# :api: plugin
|
||||
def render_to_string(*args, &block)
|
||||
options = _normalize_render(*args, &block)
|
||||
render_to_body(options)
|
||||
end
|
||||
|
||||
# Performs the actual template rendering.
|
||||
# :api: public
|
||||
def render_to_body(options = {})
|
||||
end
|
||||
|
||||
# Returns Content-Type of rendered content
|
||||
# :api: public
|
||||
# Returns Content-Type of rendered content.
|
||||
def rendered_format
|
||||
Mime[:text]
|
||||
end
|
||||
|
@ -65,7 +61,6 @@ module AbstractController
|
|||
|
||||
# This method should return a hash with assigns.
|
||||
# You can overwrite this configuration per controller.
|
||||
# :api: public
|
||||
def view_assigns
|
||||
protected_vars = _protected_ivars
|
||||
variables = instance_variables
|
||||
|
@ -79,7 +74,6 @@ module AbstractController
|
|||
# Normalize args by converting <tt>render "foo"</tt> to
|
||||
# <tt>render :action => "foo"</tt> and <tt>render "foo/bar"</tt> to
|
||||
# <tt>render :file => "foo/bar"</tt>.
|
||||
# :api: plugin
|
||||
def _normalize_args(action = nil, options = {})
|
||||
if action.respond_to?(:permitted?)
|
||||
if action.permitted?
|
||||
|
@ -95,20 +89,17 @@ module AbstractController
|
|||
end
|
||||
|
||||
# Normalize options.
|
||||
# :api: plugin
|
||||
def _normalize_options(options)
|
||||
options
|
||||
end
|
||||
|
||||
# Process extra options.
|
||||
# :api: plugin
|
||||
def _process_options(options)
|
||||
options
|
||||
end
|
||||
|
||||
# Process the rendered format.
|
||||
# :api: private
|
||||
def _process_format(format)
|
||||
def _process_format(format) # :nodoc:
|
||||
end
|
||||
|
||||
def _process_variant(options)
|
||||
|
@ -121,8 +112,7 @@ module AbstractController
|
|||
end
|
||||
|
||||
# Normalize args and options.
|
||||
# :api: private
|
||||
def _normalize_render(*args, &block)
|
||||
def _normalize_render(*args, &block) # :nodoc:
|
||||
options = _normalize_args(*args, &block)
|
||||
_process_variant(options)
|
||||
_normalize_options(options)
|
||||
|
|
|
@ -83,15 +83,12 @@ module ActionController
|
|||
# def cleanup_view_runtime
|
||||
# super - time_taken_in_something_expensive
|
||||
# end
|
||||
#
|
||||
# :api: plugin
|
||||
def cleanup_view_runtime
|
||||
yield
|
||||
end
|
||||
|
||||
# Every time after an action is processed, this method is invoked
|
||||
# with the payload, so you can add more information.
|
||||
# :api: plugin
|
||||
def append_info_to_payload(payload)
|
||||
payload[:view_runtime] = view_runtime
|
||||
end
|
||||
|
@ -100,7 +97,6 @@ module ActionController
|
|||
# A hook which allows other frameworks to log what happened during
|
||||
# controller process action. This method should return an array
|
||||
# with the messages to be added.
|
||||
# :api: plugin
|
||||
def log_process_action(payload) #:nodoc:
|
||||
messages, view_runtime = [], payload[:view_runtime]
|
||||
messages << ("Views: %.1fms" % view_runtime.to_f) if view_runtime
|
||||
|
|
|
@ -47,7 +47,6 @@ module Dispatching
|
|||
end
|
||||
|
||||
class BaseTest < Rack::TestCase
|
||||
# :api: plugin
|
||||
test "simple dispatching" do
|
||||
get "/dispatching/simple/index"
|
||||
|
||||
|
@ -56,14 +55,12 @@ module Dispatching
|
|||
assert_content_type "text/plain; charset=utf-8"
|
||||
end
|
||||
|
||||
# :api: plugin
|
||||
test "directly modifying response body" do
|
||||
get "/dispatching/simple/modify_response_body"
|
||||
|
||||
assert_body "success"
|
||||
end
|
||||
|
||||
# :api: plugin
|
||||
test "directly modifying response body twice" do
|
||||
get "/dispatching/simple/modify_response_body_twice"
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ module ActionView
|
|||
attr_accessor :output_buffer, :view_flow
|
||||
|
||||
# Prepares the context by setting the appropriate instance variables.
|
||||
# :api: plugin
|
||||
def _prepare_context
|
||||
@view_flow = OutputFlow.new
|
||||
@output_buffer = nil
|
||||
|
@ -29,7 +28,6 @@ module ActionView
|
|||
# Encapsulates the interaction with the view flow so it
|
||||
# returns the correct buffer on +yield+. This is usually
|
||||
# overwritten by helpers to add more behavior.
|
||||
# :api: plugin
|
||||
def _layout_for(name = nil)
|
||||
name ||= :layout
|
||||
view_flow.get(name).html_safe
|
||||
|
|
|
@ -75,8 +75,7 @@ module ActionView
|
|||
end
|
||||
|
||||
# Returns an object that is able to render templates.
|
||||
# :api: private
|
||||
def view_renderer
|
||||
def view_renderer # :nodoc:
|
||||
@_view_renderer ||= ActionView::Renderer.new(lookup_context)
|
||||
end
|
||||
|
||||
|
@ -92,7 +91,6 @@ module ActionView
|
|||
private
|
||||
|
||||
# Find and render a template based on the options given.
|
||||
# :api: private
|
||||
def _render_template(options)
|
||||
variant = options.delete(:variant)
|
||||
assigns = options.delete(:assigns)
|
||||
|
@ -114,7 +112,6 @@ module ActionView
|
|||
|
||||
# Normalize args by converting render "foo" to render :action => "foo" and
|
||||
# render "foo/bar" to render :template => "foo/bar".
|
||||
# :api: private
|
||||
def _normalize_args(action = nil, options = {})
|
||||
options = super(action, options)
|
||||
case action
|
||||
|
@ -137,7 +134,6 @@ module ActionView
|
|||
end
|
||||
|
||||
# Normalize options.
|
||||
# :api: private
|
||||
def _normalize_options(options)
|
||||
options = super(options)
|
||||
if options[:partial] == true
|
||||
|
|
Loading…
Reference in a new issue