Standardize nodoc comments
This commit is contained in:
parent
1bf3ce896c
commit
18707ab17f
|
@ -25,7 +25,7 @@ module ActionCable
|
|||
serialize_broadcasting([ channel_name, model ])
|
||||
end
|
||||
|
||||
def serialize_broadcasting(object) #:nodoc:
|
||||
def serialize_broadcasting(object) # :nodoc:
|
||||
case
|
||||
when object.is_a?(Array)
|
||||
object.map { |m| serialize_broadcasting(m) }.join(":")
|
||||
|
|
|
@ -68,7 +68,7 @@ module ActionCable
|
|||
|
||||
# Called by the server when a new WebSocket connection is established. This configures the callbacks intended for overwriting by the user.
|
||||
# This method should not be called directly -- instead rely upon on the #connect (and #disconnect) callbacks.
|
||||
def process #:nodoc:
|
||||
def process # :nodoc:
|
||||
logger.info started_request_message
|
||||
|
||||
if websocket.possible? && allow_request_origin?
|
||||
|
@ -80,11 +80,11 @@ module ActionCable
|
|||
|
||||
# Decodes WebSocket messages and dispatches them to subscribed channels.
|
||||
# WebSocket message transfer encoding is always JSON.
|
||||
def receive(websocket_message) #:nodoc:
|
||||
def receive(websocket_message) # :nodoc:
|
||||
send_async :dispatch_websocket_message, websocket_message
|
||||
end
|
||||
|
||||
def dispatch_websocket_message(websocket_message) #:nodoc:
|
||||
def dispatch_websocket_message(websocket_message) # :nodoc:
|
||||
if websocket.alive?
|
||||
subscriptions.execute_command decode(websocket_message)
|
||||
else
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionMailbox
|
||||
class Record < ActiveRecord::Base #:nodoc:
|
||||
class Record < ActiveRecord::Base # :nodoc:
|
||||
self.abstract_class = true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -77,7 +77,7 @@ module ActionMailbox
|
|||
@inbound_email = inbound_email
|
||||
end
|
||||
|
||||
def perform_processing #:nodoc:
|
||||
def perform_processing # :nodoc:
|
||||
track_status_of_inbound_email do
|
||||
run_callbacks :process do
|
||||
process
|
||||
|
@ -92,7 +92,7 @@ module ActionMailbox
|
|||
# Overwrite in subclasses
|
||||
end
|
||||
|
||||
def finished_processing? #:nodoc:
|
||||
def finished_processing? # :nodoc:
|
||||
inbound_email.delivered? || inbound_email.bounced?
|
||||
end
|
||||
|
||||
|
|
|
@ -555,7 +555,7 @@ module ActionMailer
|
|||
# through a callback when you call <tt>:deliver</tt> on the <tt>Mail::Message</tt>,
|
||||
# calling +deliver_mail+ directly and passing a <tt>Mail::Message</tt> will do
|
||||
# nothing except tell the logger you sent the email.
|
||||
def deliver_mail(mail) #:nodoc:
|
||||
def deliver_mail(mail) # :nodoc:
|
||||
ActiveSupport::Notifications.instrument("deliver.action_mailer") do |payload|
|
||||
set_payload_for_mail(payload, mail)
|
||||
yield # Let Mail do the delivery actions
|
||||
|
@ -606,7 +606,7 @@ module ActionMailer
|
|||
@_message = Mail.new
|
||||
end
|
||||
|
||||
def process(method_name, *args) #:nodoc:
|
||||
def process(method_name, *args) # :nodoc:
|
||||
payload = {
|
||||
mailer: self.class.name,
|
||||
action: method_name,
|
||||
|
@ -619,7 +619,7 @@ module ActionMailer
|
|||
end
|
||||
end
|
||||
|
||||
class NullMail #:nodoc:
|
||||
class NullMail # :nodoc:
|
||||
def body; "" end
|
||||
def header; {} end
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ module ActionMailer
|
|||
MSG
|
||||
end
|
||||
|
||||
def perform(mailer, mail_method, delivery_method, *args) #:nodoc:
|
||||
def perform(mailer, mail_method, delivery_method, *args) # :nodoc:
|
||||
mailer.constantize.public_send(mail_method, *args).send(delivery_method)
|
||||
end
|
||||
ruby2_keywords(:perform)
|
||||
|
|
|
@ -17,15 +17,15 @@ module ActionMailer
|
|||
|
||||
include Base64
|
||||
|
||||
def self.previewing_email(message) #:nodoc:
|
||||
def self.previewing_email(message) # :nodoc:
|
||||
new(message).transform!
|
||||
end
|
||||
|
||||
def initialize(message) #:nodoc:
|
||||
def initialize(message) # :nodoc:
|
||||
@message = message
|
||||
end
|
||||
|
||||
def transform! #:nodoc:
|
||||
def transform! # :nodoc:
|
||||
return message if html_part.blank?
|
||||
|
||||
html_part.body = html_part.decoded.gsub(PATTERN) do |match|
|
||||
|
|
|
@ -15,7 +15,7 @@ module ActionMailer
|
|||
# Notifier.welcome(User.first).deliver_later # enqueue email delivery as a job through Active Job
|
||||
# Notifier.welcome(User.first).message # a Mail::Message object
|
||||
class MessageDelivery < Delegator
|
||||
def initialize(mailer_class, action, *args) #:nodoc:
|
||||
def initialize(mailer_class, action, *args) # :nodoc:
|
||||
@mailer_class, @action, @args = mailer_class, action, args
|
||||
|
||||
# The mail is only processed if we try to call any methods on it.
|
||||
|
@ -26,12 +26,12 @@ module ActionMailer
|
|||
ruby2_keywords(:initialize)
|
||||
|
||||
# Method calls are delegated to the Mail::Message that's ready to deliver.
|
||||
def __getobj__ #:nodoc:
|
||||
def __getobj__ # :nodoc:
|
||||
@mail_message ||= processed_mailer.message
|
||||
end
|
||||
|
||||
# Unused except for delegator internals (dup, marshalling).
|
||||
def __setobj__(mail_message) #:nodoc:
|
||||
def __setobj__(mail_message) # :nodoc:
|
||||
@mail_message = mail_message
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require "active_support/descendants_tracker"
|
||||
|
||||
module ActionMailer
|
||||
module Previews #:nodoc:
|
||||
module Previews # :nodoc:
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionMailer #:nodoc:
|
||||
module ActionMailer # :nodoc:
|
||||
# Provides +rescue_from+ for mailers. Wraps mailer action processing,
|
||||
# mail job processing, and mail delivery.
|
||||
module Rescuable
|
||||
|
@ -8,12 +8,12 @@ module ActionMailer #:nodoc:
|
|||
include ActiveSupport::Rescuable
|
||||
|
||||
class_methods do
|
||||
def handle_exception(exception) #:nodoc:
|
||||
def handle_exception(exception) # :nodoc:
|
||||
rescue_with_handler(exception) || raise(exception)
|
||||
end
|
||||
end
|
||||
|
||||
def handle_exceptions #:nodoc:
|
||||
def handle_exceptions # :nodoc:
|
||||
yield
|
||||
rescue => exception
|
||||
rescue_with_handler(exception) || raise
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module AbstractController
|
||||
module AssetPaths #:nodoc:
|
||||
module AssetPaths # :nodoc:
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module AbstractController
|
||||
class Error < StandardError #:nodoc:
|
||||
class Error < StandardError # :nodoc:
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require "active_support/benchmarkable"
|
||||
|
||||
module AbstractController
|
||||
module Logger #:nodoc:
|
||||
module Logger # :nodoc:
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
|
|
|
@ -11,8 +11,8 @@ module ActionController
|
|||
# use AuthenticationMiddleware, except: [:index, :show]
|
||||
# end
|
||||
#
|
||||
class MiddlewareStack < ActionDispatch::MiddlewareStack #:nodoc:
|
||||
class Middleware < ActionDispatch::MiddlewareStack::Middleware #:nodoc:
|
||||
class MiddlewareStack < ActionDispatch::MiddlewareStack # :nodoc:
|
||||
class Middleware < ActionDispatch::MiddlewareStack::Middleware # :nodoc:
|
||||
def initialize(klass, args, actions, strategy, block)
|
||||
@actions = actions
|
||||
@strategy = strategy
|
||||
|
@ -182,7 +182,7 @@ module ActionController
|
|||
response_body || response.committed?
|
||||
end
|
||||
|
||||
def dispatch(name, request, response) #:nodoc:
|
||||
def dispatch(name, request, response) # :nodoc:
|
||||
set_request!(request)
|
||||
set_response!(response)
|
||||
process(name)
|
||||
|
@ -194,12 +194,12 @@ module ActionController
|
|||
@_response = response
|
||||
end
|
||||
|
||||
def set_request!(request) #:nodoc:
|
||||
def set_request!(request) # :nodoc:
|
||||
@_request = request
|
||||
@_request.controller_instance = self
|
||||
end
|
||||
|
||||
def to_a #:nodoc:
|
||||
def to_a # :nodoc:
|
||||
response.to_a
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
module ContentSecurityPolicy
|
||||
# TODO: Documentation
|
||||
extend ActiveSupport::Concern
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
module Cookies
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require "action_controller/metal/exceptions"
|
||||
require "action_dispatch/http/content_disposition"
|
||||
|
||||
module ActionController #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
# Methods for sending arbitrary data and for streaming files to the browser,
|
||||
# instead of rendering.
|
||||
module DataStreaming
|
||||
|
@ -11,8 +11,8 @@ module ActionController #:nodoc:
|
|||
|
||||
include ActionController::Rendering
|
||||
|
||||
DEFAULT_SEND_FILE_TYPE = "application/octet-stream" #:nodoc:
|
||||
DEFAULT_SEND_FILE_DISPOSITION = "attachment" #:nodoc:
|
||||
DEFAULT_SEND_FILE_TYPE = "application/octet-stream" # :nodoc:
|
||||
DEFAULT_SEND_FILE_DISPOSITION = "attachment" # :nodoc:
|
||||
|
||||
private
|
||||
# Sends the file. This uses a server-appropriate method (such as X-Sendfile)
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController
|
||||
class ActionControllerError < StandardError #:nodoc:
|
||||
class ActionControllerError < StandardError # :nodoc:
|
||||
end
|
||||
|
||||
class BadRequest < ActionControllerError #:nodoc:
|
||||
class BadRequest < ActionControllerError # :nodoc:
|
||||
def initialize(msg = nil)
|
||||
super(msg)
|
||||
set_backtrace $!.backtrace if $!
|
||||
end
|
||||
end
|
||||
|
||||
class RenderError < ActionControllerError #:nodoc:
|
||||
class RenderError < ActionControllerError # :nodoc:
|
||||
end
|
||||
|
||||
class RoutingError < ActionControllerError #:nodoc:
|
||||
class RoutingError < ActionControllerError # :nodoc:
|
||||
attr_reader :failures
|
||||
def initialize(message, failures = [])
|
||||
super(message)
|
||||
|
@ -22,7 +22,7 @@ module ActionController
|
|||
end
|
||||
end
|
||||
|
||||
class UrlGenerationError < ActionControllerError #:nodoc:
|
||||
class UrlGenerationError < ActionControllerError # :nodoc:
|
||||
attr_reader :routes, :route_name, :method_name
|
||||
|
||||
def initialize(message, routes = nil, route_name = nil, method_name = nil)
|
||||
|
@ -47,19 +47,19 @@ module ActionController
|
|||
end
|
||||
end
|
||||
|
||||
class MethodNotAllowed < ActionControllerError #:nodoc:
|
||||
class MethodNotAllowed < ActionControllerError # :nodoc:
|
||||
def initialize(*allowed_methods)
|
||||
super("Only #{allowed_methods.to_sentence} requests are allowed.")
|
||||
end
|
||||
end
|
||||
|
||||
class NotImplemented < MethodNotAllowed #:nodoc:
|
||||
class NotImplemented < MethodNotAllowed # :nodoc:
|
||||
end
|
||||
|
||||
class MissingFile < ActionControllerError #:nodoc:
|
||||
class MissingFile < ActionControllerError # :nodoc:
|
||||
end
|
||||
|
||||
class SessionOverflowError < ActionControllerError #:nodoc:
|
||||
class SessionOverflowError < ActionControllerError # :nodoc:
|
||||
DEFAULT_MESSAGE = "Your session data is larger than the data column in which it is to be stored. You must increase the size of your data column if you intend to store large data."
|
||||
|
||||
def initialize(message = nil)
|
||||
|
@ -67,10 +67,10 @@ module ActionController
|
|||
end
|
||||
end
|
||||
|
||||
class UnknownHttpMethod < ActionControllerError #:nodoc:
|
||||
class UnknownHttpMethod < ActionControllerError # :nodoc:
|
||||
end
|
||||
|
||||
class UnknownFormat < ActionControllerError #:nodoc:
|
||||
class UnknownFormat < ActionControllerError # :nodoc:
|
||||
end
|
||||
|
||||
# Raised when a nested respond_to is triggered and the content types of each
|
||||
|
@ -91,6 +91,6 @@ module ActionController
|
|||
end
|
||||
end
|
||||
|
||||
class MissingExactTemplate < UnknownFormat #:nodoc:
|
||||
class MissingExactTemplate < UnknownFormat # :nodoc:
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
module Flash
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
@ -42,7 +42,7 @@ module ActionController #:nodoc:
|
|||
end
|
||||
end
|
||||
|
||||
def action_methods #:nodoc:
|
||||
def action_methods # :nodoc:
|
||||
@action_methods ||= super - _flash_types.map(&:to_s).to_set
|
||||
end
|
||||
end
|
||||
|
|
|
@ -99,7 +99,7 @@ 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.
|
||||
def log_process_action(payload) #:nodoc:
|
||||
def log_process_action(payload) # :nodoc:
|
||||
messages, view_runtime = [], payload[:view_runtime]
|
||||
messages << ("Views: %.1fms" % view_runtime.to_f) if view_runtime
|
||||
messages
|
||||
|
|
|
@ -124,7 +124,7 @@ module ActionController
|
|||
class ClientDisconnected < RuntimeError
|
||||
end
|
||||
|
||||
class Buffer < ActionDispatch::Response::Buffer #:nodoc:
|
||||
class Buffer < ActionDispatch::Response::Buffer # :nodoc:
|
||||
include MonitorMixin
|
||||
|
||||
class << self
|
||||
|
@ -230,7 +230,7 @@ module ActionController
|
|||
end
|
||||
end
|
||||
|
||||
class Response < ActionDispatch::Response #:nodoc: all
|
||||
class Response < ActionDispatch::Response # :nodoc: all
|
||||
private
|
||||
def before_committed
|
||||
super
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require "abstract_controller/collector"
|
||||
|
||||
module ActionController #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
module MimeResponds
|
||||
# Without web-service support, an action which collects the data for displaying a list of people
|
||||
# might look something like this:
|
||||
|
@ -289,7 +289,7 @@ module ActionController #:nodoc:
|
|||
@format = request.negotiate_mime(@responses.keys)
|
||||
end
|
||||
|
||||
class VariantCollector #:nodoc:
|
||||
class VariantCollector # :nodoc:
|
||||
def initialize(variant = nil)
|
||||
@variant = variant
|
||||
@variants = {}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
# HTTP Permissions Policy is a web standard for defining a mechanism to
|
||||
# allow and deny the use of browser permissions in its own context, and
|
||||
# in content within any <iframe> elements in the document.
|
||||
|
|
|
@ -123,7 +123,7 @@ module ActionController
|
|||
end
|
||||
end
|
||||
|
||||
def _compute_redirect_to_location(request, options) #:nodoc:
|
||||
def _compute_redirect_to_location(request, options) # :nodoc:
|
||||
case options
|
||||
# The scheme name consist of a letter followed by any combination of
|
||||
# letters, digits, and the plus ("+"), period ("."), or hyphen ("-")
|
||||
|
|
|
@ -25,7 +25,7 @@ module ActionController
|
|||
end
|
||||
|
||||
# Check for double render errors and set the content_type after rendering.
|
||||
def render(*args) #:nodoc:
|
||||
def render(*args) # :nodoc:
|
||||
raise ::AbstractController::DoubleRenderError if response_body
|
||||
super
|
||||
end
|
||||
|
@ -48,7 +48,7 @@ module ActionController
|
|||
|
||||
private
|
||||
# Before processing, set the request formats in current controller formats.
|
||||
def process_action(*) #:nodoc:
|
||||
def process_action(*) # :nodoc:
|
||||
self.formats = request.formats.filter_map(&:ref)
|
||||
super
|
||||
end
|
||||
|
|
|
@ -4,11 +4,11 @@ require "rack/session/abstract/id"
|
|||
require "action_controller/metal/exceptions"
|
||||
require "active_support/security_utils"
|
||||
|
||||
module ActionController #:nodoc:
|
||||
class InvalidAuthenticityToken < ActionControllerError #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
class InvalidAuthenticityToken < ActionControllerError # :nodoc:
|
||||
end
|
||||
|
||||
class InvalidCrossOriginRequest < ActionControllerError #:nodoc:
|
||||
class InvalidCrossOriginRequest < ActionControllerError # :nodoc:
|
||||
end
|
||||
|
||||
# Controller actions are protected from Cross-Site Request Forgery (CSRF) attacks
|
||||
|
@ -186,7 +186,7 @@ module ActionController #:nodoc:
|
|||
end
|
||||
|
||||
private
|
||||
class NullSessionHash < Rack::Session::Abstract::SessionHash #:nodoc:
|
||||
class NullSessionHash < Rack::Session::Abstract::SessionHash # :nodoc:
|
||||
def initialize(req)
|
||||
super(nil, req)
|
||||
@data = {}
|
||||
|
@ -205,7 +205,7 @@ module ActionController #:nodoc:
|
|||
end
|
||||
end
|
||||
|
||||
class NullCookieJar < ActionDispatch::Cookies::CookieJar #:nodoc:
|
||||
class NullCookieJar < ActionDispatch::Cookies::CookieJar # :nodoc:
|
||||
def write(*)
|
||||
# nothing
|
||||
end
|
||||
|
@ -266,7 +266,7 @@ module ActionController #:nodoc:
|
|||
protection_strategy.handle_unverified_request
|
||||
end
|
||||
|
||||
def unverified_request_warning_message #:nodoc:
|
||||
def unverified_request_warning_message # :nodoc:
|
||||
if valid_request_origin?
|
||||
"Can't verify CSRF token authenticity."
|
||||
else
|
||||
|
@ -274,7 +274,7 @@ module ActionController #:nodoc:
|
|||
end
|
||||
end
|
||||
|
||||
#:nodoc:
|
||||
# :nodoc:
|
||||
CROSS_ORIGIN_JAVASCRIPT_WARNING = "Security warning: an embedded " \
|
||||
"<script> tag on another site requested protected JavaScript. " \
|
||||
"If you know what you're doing, go ahead and disable forgery " \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
# This module is responsible for providing +rescue_from+ helpers
|
||||
# to controllers and configuring when detailed exceptions must be
|
||||
# shown.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require "rack/chunked"
|
||||
|
||||
module ActionController #:nodoc:
|
||||
module ActionController # :nodoc:
|
||||
# Allows views to be streamed back to the client as they are rendered.
|
||||
#
|
||||
# By default, Rails renders views by first rendering the template
|
||||
|
|
|
@ -8,7 +8,7 @@ require "action_controller/railties/helpers"
|
|||
require "action_view/railtie"
|
||||
|
||||
module ActionController
|
||||
class Railtie < Rails::Railtie #:nodoc:
|
||||
class Railtie < Rails::Railtie # :nodoc:
|
||||
config.action_controller = ActiveSupport::OrderedOptions.new
|
||||
config.action_controller.raise_on_open_redirects = false
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ module ActionController
|
|||
|
||||
# ActionController::TestCase will be deprecated and moved to a gem in the future.
|
||||
# Please use ActionDispatch::IntegrationTest going forward.
|
||||
class TestRequest < ActionDispatch::TestRequest #:nodoc:
|
||||
class TestRequest < ActionDispatch::TestRequest # :nodoc:
|
||||
DEFAULT_ENV = ActionDispatch::TestRequest::DEFAULT_ENV.dup
|
||||
DEFAULT_ENV.delete "PATH_INFO"
|
||||
|
||||
|
@ -179,7 +179,7 @@ module ActionController
|
|||
|
||||
# Methods #destroy and #load! are overridden to avoid calling methods on the
|
||||
# @store object, which does not exist for the TestSession class.
|
||||
class TestSession < Rack::Session::Abstract::PersistedSecure::SecureSessionHash #:nodoc:
|
||||
class TestSession < Rack::Session::Abstract::PersistedSecure::SecureSessionHash # :nodoc:
|
||||
DEFAULT_OPTIONS = Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS
|
||||
|
||||
def initialize(session = {})
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require "active_support/core_ext/object/deep_dup"
|
||||
|
||||
module ActionDispatch #:nodoc:
|
||||
module ActionDispatch # :nodoc:
|
||||
class ContentSecurityPolicy
|
||||
class Middleware
|
||||
CONTENT_TYPE = "Content-Type"
|
||||
|
|
|
@ -67,7 +67,7 @@ module Mime
|
|||
@register_callbacks = []
|
||||
|
||||
# A simple helper class used in parsing the accept header.
|
||||
class AcceptItem #:nodoc:
|
||||
class AcceptItem # :nodoc:
|
||||
attr_accessor :index, :name, :q
|
||||
alias :to_s :name
|
||||
|
||||
|
@ -85,7 +85,7 @@ module Mime
|
|||
end
|
||||
end
|
||||
|
||||
class AcceptList #:nodoc:
|
||||
class AcceptList # :nodoc:
|
||||
def self.sort!(list)
|
||||
list.sort!
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ module ActionDispatch
|
|||
end
|
||||
alias :params :parameters
|
||||
|
||||
def path_parameters=(parameters) #:nodoc:
|
||||
def path_parameters=(parameters) # :nodoc:
|
||||
delete_header("action_dispatch.request.parameters")
|
||||
|
||||
parameters = Request::Utils.set_binary_encoding(self, parameters, parameters[:controller], parameters[:action])
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require "active_support/core_ext/object/deep_dup"
|
||||
|
||||
module ActionDispatch #:nodoc:
|
||||
module ActionDispatch # :nodoc:
|
||||
class PermissionsPolicy
|
||||
class Middleware
|
||||
CONTENT_TYPE = "Content-Type"
|
||||
|
|
|
@ -162,7 +162,7 @@ module ActionDispatch
|
|||
set_header(routes.env_key, name.dup)
|
||||
end
|
||||
|
||||
def request_method=(request_method) #:nodoc:
|
||||
def request_method=(request_method) # :nodoc:
|
||||
if check_method(request_method)
|
||||
@request_method = set_header("REQUEST_METHOD", request_method)
|
||||
end
|
||||
|
@ -352,7 +352,7 @@ module ActionDispatch
|
|||
FORM_DATA_MEDIA_TYPES.include?(media_type)
|
||||
end
|
||||
|
||||
def body_stream #:nodoc:
|
||||
def body_stream # :nodoc:
|
||||
get_header("rack.input")
|
||||
end
|
||||
|
||||
|
@ -360,7 +360,7 @@ module ActionDispatch
|
|||
session.destroy
|
||||
end
|
||||
|
||||
def session=(session) #:nodoc:
|
||||
def session=(session) # :nodoc:
|
||||
Session.set self, session
|
||||
end
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ module ActionDispatch # :nodoc:
|
|||
# Avoid having to pass an open file handle as the response body.
|
||||
# Rack::Sendfile will usually intercept the response and uses
|
||||
# the path directly, so there is no reason to open the file.
|
||||
class FileBody #:nodoc:
|
||||
class FileBody # :nodoc:
|
||||
attr_reader :to_path
|
||||
|
||||
def initialize(path)
|
||||
|
|
|
@ -284,7 +284,7 @@ module ActionDispatch
|
|||
end
|
||||
end
|
||||
|
||||
class CookieJar #:nodoc:
|
||||
class CookieJar # :nodoc:
|
||||
include Enumerable, ChainedCookieJars
|
||||
|
||||
# This regular expression is used to split the levels of a domain.
|
||||
|
|
|
@ -77,7 +77,7 @@ module ActionDispatch
|
|||
end
|
||||
end
|
||||
|
||||
class FlashNow #:nodoc:
|
||||
class FlashNow # :nodoc:
|
||||
attr_accessor :flash
|
||||
|
||||
def initialize(flash)
|
||||
|
@ -109,7 +109,7 @@ module ActionDispatch
|
|||
class FlashHash
|
||||
include Enumerable
|
||||
|
||||
def self.from_session_value(value) #:nodoc:
|
||||
def self.from_session_value(value) # :nodoc:
|
||||
case value
|
||||
when FlashHash # Rails 3.1, 3.2
|
||||
flashes = value.instance_variable_get(:@flashes)
|
||||
|
@ -130,13 +130,13 @@ module ActionDispatch
|
|||
|
||||
# Builds a hash containing the flashes to keep for the next request.
|
||||
# If there are none to keep, returns +nil+.
|
||||
def to_session_value #:nodoc:
|
||||
def to_session_value # :nodoc:
|
||||
flashes_to_keep = @flashes.except(*@discard)
|
||||
return nil if flashes_to_keep.empty?
|
||||
{ "discard" => [], "flashes" => flashes_to_keep }
|
||||
end
|
||||
|
||||
def initialize(flashes = {}, discard = []) #:nodoc:
|
||||
def initialize(flashes = {}, discard = []) # :nodoc:
|
||||
@discard = Set.new(stringify_array(discard))
|
||||
@flashes = flashes.stringify_keys
|
||||
@now = nil
|
||||
|
@ -160,7 +160,7 @@ module ActionDispatch
|
|||
@flashes[k.to_s]
|
||||
end
|
||||
|
||||
def update(h) #:nodoc:
|
||||
def update(h) # :nodoc:
|
||||
@discard.subtract stringify_array(h.keys)
|
||||
@flashes.update h.stringify_keys
|
||||
self
|
||||
|
@ -200,7 +200,7 @@ module ActionDispatch
|
|||
|
||||
alias :merge! :update
|
||||
|
||||
def replace(h) #:nodoc:
|
||||
def replace(h) # :nodoc:
|
||||
@discard.clear
|
||||
@flashes.replace h.stringify_keys
|
||||
self
|
||||
|
@ -251,7 +251,7 @@ module ActionDispatch
|
|||
# Mark for removal entries that were kept, and delete unkept ones.
|
||||
#
|
||||
# This method is called automatically by filters, so you generally don't need to care about it.
|
||||
def sweep #:nodoc:
|
||||
def sweep # :nodoc:
|
||||
@discard.each { |k| @flashes.delete k }
|
||||
@discard.replace @flashes.keys
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ require "action_dispatch/request/session"
|
|||
|
||||
module ActionDispatch
|
||||
module Session
|
||||
class SessionRestoreError < StandardError #:nodoc:
|
||||
class SessionRestoreError < StandardError # :nodoc:
|
||||
def initialize
|
||||
super("Session contains objects whose class definition isn't available.\n" \
|
||||
"Remember to require the classes for all objects kept in the session.\n" \
|
||||
|
|
|
@ -42,7 +42,7 @@ module ActionDispatch
|
|||
req.delete_header ENV_SESSION_KEY
|
||||
end
|
||||
|
||||
class Options #:nodoc:
|
||||
class Options # :nodoc:
|
||||
def self.set(req, options)
|
||||
req.set_header ENV_SESSION_OPTIONS_KEY, options
|
||||
end
|
||||
|
|
|
@ -255,7 +255,7 @@ module ActionDispatch
|
|||
autoload :UrlFor
|
||||
autoload :PolymorphicRoutes
|
||||
|
||||
SEPARATORS = %w( / . ? ) #:nodoc:
|
||||
HTTP_METHODS = [:get, :head, :post, :patch, :put, :delete, :options] #:nodoc:
|
||||
SEPARATORS = %w( / . ? ) # :nodoc:
|
||||
HTTP_METHODS = [:get, :head, :post, :patch, :put, :delete, :options] # :nodoc:
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module ActionDispatch
|
|||
class Mapper
|
||||
URL_OPTIONS = [:protocol, :subdomain, :domain, :host, :port]
|
||||
|
||||
class Constraints < Routing::Endpoint #:nodoc:
|
||||
class Constraints < Routing::Endpoint # :nodoc:
|
||||
attr_reader :app, :constraints
|
||||
|
||||
SERVE = ->(app, req) { app.serve req }
|
||||
|
@ -66,7 +66,7 @@ module ActionDispatch
|
|||
end
|
||||
end
|
||||
|
||||
class Mapping #:nodoc:
|
||||
class Mapping # :nodoc:
|
||||
ANCHOR_CHARACTERS_REGEX = %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
|
||||
OPTIONAL_FORMAT_REGEX = %r{(?:\(\.:format\)+|\.:format|/)\Z}
|
||||
|
||||
|
@ -1135,7 +1135,7 @@ module ActionDispatch
|
|||
RESOURCE_OPTIONS = [:as, :controller, :path, :only, :except, :param, :concerns]
|
||||
CANONICAL_ACTIONS = %w(index create new show update destroy)
|
||||
|
||||
class Resource #:nodoc:
|
||||
class Resource # :nodoc:
|
||||
attr_reader :controller, :path, :param
|
||||
|
||||
def initialize(entities, api_only, shallow, options = {})
|
||||
|
@ -1230,7 +1230,7 @@ module ActionDispatch
|
|||
def singleton?; false; end
|
||||
end
|
||||
|
||||
class SingletonResource < Resource #:nodoc:
|
||||
class SingletonResource < Resource # :nodoc:
|
||||
def initialize(entities, api_only, shallow, options)
|
||||
super
|
||||
@as = nil
|
||||
|
@ -2289,7 +2289,7 @@ module ActionDispatch
|
|||
NULL = Scope.new(nil, nil)
|
||||
end
|
||||
|
||||
def initialize(set) #:nodoc:
|
||||
def initialize(set) # :nodoc:
|
||||
@set = set
|
||||
@draw_paths = set.draw_paths
|
||||
@scope = Scope.new(path_names: @set.resources_path_names)
|
||||
|
|
|
@ -4,7 +4,7 @@ require "active_support/core_ext/array/extract_options"
|
|||
|
||||
module ActionDispatch
|
||||
module Routing
|
||||
class RoutesProxy #:nodoc:
|
||||
class RoutesProxy # :nodoc:
|
||||
include ActionDispatch::Routing::UrlFor
|
||||
|
||||
attr_accessor :scope, :routes
|
||||
|
|
|
@ -8,7 +8,7 @@ require "minitest"
|
|||
require "action_dispatch/testing/request_encoder"
|
||||
|
||||
module ActionDispatch
|
||||
module Integration #:nodoc:
|
||||
module Integration # :nodoc:
|
||||
module RequestHelpers
|
||||
# Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process
|
||||
# for more details.
|
||||
|
@ -402,7 +402,7 @@ module ActionDispatch
|
|||
|
||||
# Copy the instance variables from the current session instance into the
|
||||
# test instance.
|
||||
def copy_session_variables! #:nodoc:
|
||||
def copy_session_variables! # :nodoc:
|
||||
@controller = @integration_session.controller
|
||||
@response = @integration_session.response
|
||||
@request = @integration_session.request
|
||||
|
|
|
@ -35,7 +35,7 @@ module ActionText
|
|||
end
|
||||
end
|
||||
|
||||
def render_action_text_attachment(attachment, locals: {}) #:nodoc:
|
||||
def render_action_text_attachment(attachment, locals: {}) # :nodoc:
|
||||
options = { locals: locals, object: attachment, partial: attachment }
|
||||
|
||||
if attachment.respond_to?(:to_attachable_partial_path)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionText
|
||||
class Record < ActiveRecord::Base #:nodoc:
|
||||
class Record < ActiveRecord::Base # :nodoc:
|
||||
self.abstract_class = true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ require "active_support/concern"
|
|||
require "active_support/core_ext/module/attribute_accessors_per_thread"
|
||||
|
||||
module ActionText
|
||||
module Rendering #:nodoc:
|
||||
module Rendering # :nodoc:
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
|
|
|
@ -9,7 +9,7 @@ require "action_view/context"
|
|||
require "action_view/template"
|
||||
require "action_view/lookup_context"
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
# = Action View Base
|
||||
#
|
||||
# Action View templates can be written in several ways.
|
||||
|
@ -179,7 +179,7 @@ module ActionView #:nodoc:
|
|||
ActionView::Resolver.caching = value
|
||||
end
|
||||
|
||||
def xss_safe? #:nodoc:
|
||||
def xss_safe? # :nodoc:
|
||||
true
|
||||
end
|
||||
|
||||
|
@ -227,7 +227,7 @@ module ActionView #:nodoc:
|
|||
|
||||
# :startdoc:
|
||||
|
||||
def initialize(lookup_context, assigns, controller) #:nodoc:
|
||||
def initialize(lookup_context, assigns, controller) # :nodoc:
|
||||
@_config = ActiveSupport::InheritableOptions.new
|
||||
|
||||
@lookup_context = lookup_context
|
||||
|
|
|
@ -18,7 +18,7 @@ module ActionView
|
|||
# sbuf << 5
|
||||
# puts sbuf # => "hello\u0005"
|
||||
#
|
||||
class OutputBuffer < ActiveSupport::SafeBuffer #:nodoc:
|
||||
class OutputBuffer < ActiveSupport::SafeBuffer # :nodoc:
|
||||
def initialize(*)
|
||||
super
|
||||
encode!
|
||||
|
@ -38,7 +38,7 @@ module ActionView
|
|||
alias :safe_append= :safe_concat
|
||||
end
|
||||
|
||||
class StreamingBuffer #:nodoc:
|
||||
class StreamingBuffer # :nodoc:
|
||||
def initialize(block)
|
||||
@block = block
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require "active_support/core_ext/string/output_safety"
|
||||
|
||||
module ActionView
|
||||
class OutputFlow #:nodoc:
|
||||
class OutputFlow # :nodoc:
|
||||
attr_reader :content
|
||||
|
||||
def initialize
|
||||
|
@ -27,7 +27,7 @@ module ActionView
|
|||
alias_method :append!, :append
|
||||
end
|
||||
|
||||
class StreamingFlow < OutputFlow #:nodoc:
|
||||
class StreamingFlow < OutputFlow # :nodoc:
|
||||
def initialize(view, fiber)
|
||||
@view = view
|
||||
@parent = nil
|
||||
|
|
|
@ -25,8 +25,8 @@ require "action_view/helpers/number_helper"
|
|||
require "action_view/helpers/rendering_helper"
|
||||
require "action_view/helpers/translation_helper"
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module Helpers #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
module Helpers # :nodoc:
|
||||
extend ActiveSupport::Autoload
|
||||
|
||||
autoload :Tags
|
||||
|
|
|
@ -5,7 +5,7 @@ require "active_support/core_ext/enumerable"
|
|||
|
||||
module ActionView
|
||||
# = Active Model Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module ActiveModelHelper
|
||||
end
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ require "action_view/helpers/tag_helper"
|
|||
|
||||
module ActionView
|
||||
# = Action View Asset Tag Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# This module provides methods for generating HTML that links views to assets such
|
||||
# as images, JavaScripts, stylesheets, and feeds. These methods do not verify
|
||||
# the assets exist before linking to them:
|
||||
|
|
|
@ -4,7 +4,7 @@ require "zlib"
|
|||
|
||||
module ActionView
|
||||
# = Action View Asset URL Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# This module provides methods for generating asset paths and
|
||||
# URLs.
|
||||
#
|
||||
|
|
|
@ -4,7 +4,7 @@ require "set"
|
|||
|
||||
module ActionView
|
||||
# = Action View Atom Feed Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module AtomFeedHelper
|
||||
# Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other
|
||||
# template languages).
|
||||
|
@ -126,7 +126,7 @@ module ActionView
|
|||
end
|
||||
end
|
||||
|
||||
class AtomBuilder #:nodoc:
|
||||
class AtomBuilder # :nodoc:
|
||||
XHTML_TAG_NAMES = %w(content rights title subtitle summary).to_set
|
||||
|
||||
def initialize(xml)
|
||||
|
@ -160,7 +160,7 @@ module ActionView
|
|||
end
|
||||
end
|
||||
|
||||
class AtomFeedBuilder < AtomBuilder #:nodoc:
|
||||
class AtomFeedBuilder < AtomBuilder # :nodoc:
|
||||
def initialize(xml, view, feed_options = {})
|
||||
@xml, @view, @feed_options = xml, view, feed_options
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
module ActionView
|
||||
# = Action View Cache Helper
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module CacheHelper
|
||||
# This helper exposes a method for caching fragments of a view
|
||||
# rather than an entire action or page. This technique is useful
|
||||
|
|
|
@ -4,7 +4,7 @@ require "active_support/core_ext/string/output_safety"
|
|||
|
||||
module ActionView
|
||||
# = Action View Capture Helper
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# CaptureHelper exposes methods to let you extract generated markup which
|
||||
# can be used in other parts of a template or layout file.
|
||||
#
|
||||
|
@ -198,7 +198,7 @@ module ActionView
|
|||
|
||||
# Use an alternate output buffer for the duration of the block.
|
||||
# Defaults to a new empty string.
|
||||
def with_output_buffer(buf = nil) #:nodoc:
|
||||
def with_output_buffer(buf = nil) # :nodoc:
|
||||
unless buf
|
||||
buf = ActionView::OutputBuffer.new
|
||||
if output_buffer && output_buffer.respond_to?(:encoding)
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
require "active_support/core_ext/module/attr_internal"
|
||||
|
||||
module ActionView
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# This module keeps all methods and behavior in ActionView
|
||||
# that simply delegates to the controller.
|
||||
module ControllerHelper #:nodoc:
|
||||
module ControllerHelper # :nodoc:
|
||||
attr_internal :controller, :request
|
||||
|
||||
CONTROLLER_DELEGATES = [:request_forgery_protection_token, :params,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
module ActionView
|
||||
# = Action View CSP Helper
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module CspHelper
|
||||
# Returns a meta tag "csp-nonce" with the per-session nonce value
|
||||
# for allowing inline <script> tags.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
module ActionView
|
||||
# = Action View CSRF Helper
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module CsrfHelper
|
||||
# Returns meta tags "csrf-param" and "csrf-token" with the name of the cross-site
|
||||
# request forgery protection parameter and token, respectively.
|
||||
|
|
|
@ -9,7 +9,7 @@ require "active_support/core_ext/object/acts_like"
|
|||
require "active_support/core_ext/object/with_options"
|
||||
|
||||
module ActionView
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# = Action View Date Helpers
|
||||
#
|
||||
# The Date Helper primarily creates select/option tags for different kinds of dates and times or date and time
|
||||
|
@ -699,7 +699,7 @@ module ActionView
|
|||
end
|
||||
end
|
||||
|
||||
class DateTimeSelector #:nodoc:
|
||||
class DateTimeSelector # :nodoc:
|
||||
include ActionView::Helpers::TagHelper
|
||||
|
||||
DEFAULT_PREFIX = "date"
|
||||
|
|
|
@ -6,7 +6,7 @@ module ActionView
|
|||
# = Action View Debug Helper
|
||||
#
|
||||
# Provides a set of methods for making it easier to debug Rails objects.
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module DebugHelper
|
||||
include TagHelper
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ require "active_support/core_ext/string/inflections"
|
|||
|
||||
module ActionView
|
||||
# = Action View Form Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# Form helpers are designed to make working with resources much easier
|
||||
# compared to using vanilla HTML.
|
||||
#
|
||||
|
@ -453,7 +453,7 @@ module ActionView
|
|||
form_tag_with_body(html_options, output)
|
||||
end
|
||||
|
||||
def apply_form_for_options!(record, object, options) #:nodoc:
|
||||
def apply_form_for_options!(record, object, options) # :nodoc:
|
||||
object = convert_to_model(object)
|
||||
|
||||
as = options[:as]
|
||||
|
|
|
@ -9,7 +9,7 @@ require "action_view/helpers/text_helper"
|
|||
|
||||
module ActionView
|
||||
# = Action View Form Option Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# Provides a number of methods for turning different kinds of containers into a set of option tags.
|
||||
#
|
||||
# The <tt>collection_select</tt>, <tt>select</tt> and <tt>time_zone_select</tt> methods take an <tt>options</tt> parameter, a hash:
|
||||
|
|
|
@ -8,7 +8,7 @@ require "active_support/core_ext/module/attribute_accessors"
|
|||
|
||||
module ActionView
|
||||
# = Action View Form Tag Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# Provides a number of methods for creating form tags that don't rely on an Active Record object assigned to the template like
|
||||
# FormHelper does. Instead, you provide the names and values manually.
|
||||
#
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module JavaScriptHelper
|
||||
JS_ESCAPE_MAP = {
|
||||
"\\" => "\\\\",
|
||||
|
@ -87,7 +87,7 @@ module ActionView
|
|||
content_tag("script", javascript_cdata_section(content), html_options)
|
||||
end
|
||||
|
||||
def javascript_cdata_section(content) #:nodoc:
|
||||
def javascript_cdata_section(content) # :nodoc:
|
||||
"\n//#{cdata_section("\n#{content}\n//")}\n".html_safe
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ require "active_support/number_helper"
|
|||
|
||||
module ActionView
|
||||
# = Action View Number Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# Provides methods for converting numbers into formatted strings.
|
||||
# Methods are provided for phone numbers, currency, percentage,
|
||||
# precision, positional notation, file size and pretty printing.
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
require "active_support/core_ext/string/output_safety"
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
# = Action View Raw Output Helper
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module OutputSafetyHelper
|
||||
# This method outputs without escaping a string. Since escaping tags is
|
||||
# now default, this can be used when you don't want Rails to automatically
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# = Action View Rendering
|
||||
#
|
||||
# Implements methods that allow rendering from a view context.
|
||||
|
|
|
@ -4,7 +4,7 @@ require "rails-html-sanitizer"
|
|||
|
||||
module ActionView
|
||||
# = Action View Sanitize Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements.
|
||||
# These helper methods extend Action View making them callable within your template files.
|
||||
module SanitizeHelper
|
||||
|
@ -121,7 +121,7 @@ module ActionView
|
|||
self.class.link_sanitizer.sanitize(html)
|
||||
end
|
||||
|
||||
module ClassMethods #:nodoc:
|
||||
module ClassMethods # :nodoc:
|
||||
attr_writer :full_sanitizer, :link_sanitizer, :safe_list_sanitizer
|
||||
|
||||
def sanitizer_vendor
|
||||
|
|
|
@ -8,7 +8,7 @@ require "action_view/helpers/output_safety_helper"
|
|||
|
||||
module ActionView
|
||||
# = Action View Tag Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# Provides methods to generate HTML tags programmatically both as a modern
|
||||
# HTML5 compliant builder style and legacy XHTML compliant tags.
|
||||
module TagHelper
|
||||
|
@ -41,7 +41,7 @@ module ActionView
|
|||
PRE_CONTENT_STRINGS[:textarea] = "\n"
|
||||
PRE_CONTENT_STRINGS["textarea"] = "\n"
|
||||
|
||||
class TagBuilder #:nodoc:
|
||||
class TagBuilder # :nodoc:
|
||||
include CaptureHelper
|
||||
include OutputSafetyHelper
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView
|
||||
module Helpers #:nodoc:
|
||||
module Tags #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module Tags # :nodoc:
|
||||
extend ActiveSupport::Autoload
|
||||
|
||||
eager_autoload do
|
||||
|
|
|
@ -5,7 +5,7 @@ require "action_view/helpers/tags/checkable"
|
|||
module ActionView
|
||||
module Helpers
|
||||
module Tags # :nodoc:
|
||||
class CheckBox < Base #:nodoc:
|
||||
class CheckBox < Base # :nodoc:
|
||||
include Checkable
|
||||
|
||||
def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
module ActionView
|
||||
module Helpers
|
||||
module Tags # :nodoc:
|
||||
class CollectionSelect < Base #:nodoc:
|
||||
class CollectionSelect < Base # :nodoc:
|
||||
def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, html_options)
|
||||
@collection = collection
|
||||
@value_method = value_method
|
||||
|
|
|
@ -9,7 +9,7 @@ require "action_view/helpers/output_safety_helper"
|
|||
|
||||
module ActionView
|
||||
# = Action View Text Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# The TextHelper module provides a set of methods for filtering, formatting
|
||||
# and transforming strings, which can reduce the amount of inline Ruby code in
|
||||
# your views. These helper methods extend Action View making them callable
|
||||
|
@ -407,7 +407,7 @@ module ActionView
|
|||
cycle.reset if cycle
|
||||
end
|
||||
|
||||
class Cycle #:nodoc:
|
||||
class Cycle # :nodoc:
|
||||
attr_reader :values
|
||||
|
||||
def initialize(first_value, *values)
|
||||
|
|
|
@ -4,7 +4,7 @@ require "action_view/helpers/tag_helper"
|
|||
|
||||
module ActionView
|
||||
# = Action View Translation Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
module TranslationHelper
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ require "action_view/helpers/tag_helper"
|
|||
|
||||
module ActionView
|
||||
# = Action View URL Helpers
|
||||
module Helpers #:nodoc:
|
||||
module Helpers # :nodoc:
|
||||
# Provides a set of methods for making links and getting URLs that
|
||||
# depend on the routing subsystem (see ActionDispatch::Routing).
|
||||
# This allows you to use the same format for links in views
|
||||
|
|
|
@ -12,7 +12,7 @@ module ActionView
|
|||
# <tt>LookupContext</tt> is also responsible for generating a key, given to
|
||||
# view paths, used in the resolver cache lookup. Since this key is generated
|
||||
# only once during the request, it speeds up all cache accesses.
|
||||
class LookupContext #:nodoc:
|
||||
class LookupContext # :nodoc:
|
||||
attr_accessor :prefixes, :rendered_format
|
||||
|
||||
singleton_class.attr_accessor :registered_details
|
||||
|
@ -36,7 +36,7 @@ module ActionView
|
|||
end
|
||||
|
||||
# Holds accessors for the registered details.
|
||||
module Accessors #:nodoc:
|
||||
module Accessors # :nodoc:
|
||||
DEFAULT_PROCS = {}
|
||||
end
|
||||
|
||||
|
@ -51,7 +51,7 @@ module ActionView
|
|||
register_detail(:variants) { [] }
|
||||
register_detail(:handlers) { Template::Handlers.extensions }
|
||||
|
||||
class DetailsKey #:nodoc:
|
||||
class DetailsKey # :nodoc:
|
||||
alias :eql? :equal?
|
||||
|
||||
@details_keys = Concurrent::Map.new
|
||||
|
@ -96,7 +96,7 @@ module ActionView
|
|||
|
||||
# Calculate the details key. Remove the handlers from calculation to improve performance
|
||||
# since the user cannot modify it explicitly.
|
||||
def details_key #:nodoc:
|
||||
def details_key # :nodoc:
|
||||
@details_key ||= DetailsKey.details_cache_key(@details) if @cache
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView
|
||||
module ModelNaming #:nodoc:
|
||||
module ModelNaming # :nodoc:
|
||||
# Converts the given object to an ActiveModel compliant one.
|
||||
def convert_to_model(object)
|
||||
object.respond_to?(:to_model) ? object.to_model : object
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
# = Action View PathSet
|
||||
#
|
||||
# This class is used to store and access paths in Action View. A number of
|
||||
|
@ -8,7 +8,7 @@ module ActionView #:nodoc:
|
|||
# set and also perform operations on other +PathSet+ objects.
|
||||
#
|
||||
# A +LookupContext+ will use a +PathSet+ to store the paths in its context.
|
||||
class PathSet #:nodoc:
|
||||
class PathSet # :nodoc:
|
||||
include Enumerable
|
||||
|
||||
attr_reader :paths
|
||||
|
|
|
@ -18,7 +18,7 @@ module ActionView
|
|||
# renderer object of the correct type is created, and the +render+ method on
|
||||
# that new object is called in turn. This abstracts the set up and rendering
|
||||
# into a separate classes for partials and templates.
|
||||
class AbstractRenderer #:nodoc:
|
||||
class AbstractRenderer # :nodoc:
|
||||
delegate :template_exists?, :any_templates?, :formats, to: :@lookup_context
|
||||
|
||||
def initialize(lookup_context)
|
||||
|
|
|
@ -44,12 +44,12 @@ module ActionView
|
|||
end
|
||||
|
||||
# Direct access to template rendering.
|
||||
def render_template(context, options) #:nodoc:
|
||||
def render_template(context, options) # :nodoc:
|
||||
render_template_to_object(context, options).body
|
||||
end
|
||||
|
||||
# Direct access to partial rendering.
|
||||
def render_partial(context, options, &block) #:nodoc:
|
||||
def render_partial(context, options, &block) # :nodoc:
|
||||
render_partial_to_object(context, options, &block).body
|
||||
end
|
||||
|
||||
|
@ -57,11 +57,11 @@ module ActionView
|
|||
@cache_hits ||= {}
|
||||
end
|
||||
|
||||
def render_template_to_object(context, options) #:nodoc:
|
||||
def render_template_to_object(context, options) # :nodoc:
|
||||
TemplateRenderer.new(@lookup_context).render(context, options)
|
||||
end
|
||||
|
||||
def render_partial_to_object(context, options, &block) #:nodoc:
|
||||
def render_partial_to_object(context, options, &block) # :nodoc:
|
||||
partial = options[:partial]
|
||||
if String === partial
|
||||
collection = collection_from_options(options)
|
||||
|
|
|
@ -7,11 +7,11 @@ module ActionView
|
|||
#
|
||||
# * Support streaming from child templates, partials and so on.
|
||||
# * Rack::Cache needs to support streaming bodies
|
||||
class StreamingTemplateRenderer < TemplateRenderer #:nodoc:
|
||||
class StreamingTemplateRenderer < TemplateRenderer # :nodoc:
|
||||
# A valid Rack::Body (i.e. it responds to each).
|
||||
# It is initialized with a block that, when called, starts
|
||||
# rendering the template.
|
||||
class Body #:nodoc:
|
||||
class Body # :nodoc:
|
||||
def initialize(&start)
|
||||
@start = start
|
||||
end
|
||||
|
@ -42,7 +42,7 @@ module ActionView
|
|||
# For streaming, instead of rendering a given a template, we return a Body
|
||||
# object that responds to each. This object is initialized with a block
|
||||
# that knows how to render the template.
|
||||
def render_template(view, template, layout_name = nil, locals = {}) #:nodoc:
|
||||
def render_template(view, template, layout_name = nil, locals = {}) # :nodoc:
|
||||
return [super.body] unless layout_name && template.supports_streaming?
|
||||
|
||||
locals ||= {}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView
|
||||
class TemplateRenderer < AbstractRenderer #:nodoc:
|
||||
class TemplateRenderer < AbstractRenderer # :nodoc:
|
||||
def render(context, options)
|
||||
@details = extract_details(options)
|
||||
template = determine_template(options)
|
||||
|
|
|
@ -5,7 +5,7 @@ require "action_view/view_paths"
|
|||
module ActionView
|
||||
# This is a class to fix I18n global state. Whenever you provide I18n.locale during a request,
|
||||
# it will trigger the lookup_context and consequently expire the cache.
|
||||
class I18nProxy < ::I18n::Config #:nodoc:
|
||||
class I18nProxy < ::I18n::Config # :nodoc:
|
||||
attr_reader :original_config, :lookup_context
|
||||
|
||||
def initialize(original_config, lookup_context)
|
||||
|
@ -34,7 +34,7 @@ module ActionView
|
|||
end
|
||||
|
||||
# Overwrite process to set up I18n proxy.
|
||||
def process(*) #:nodoc:
|
||||
def process(*) # :nodoc:
|
||||
old_config, I18n.config = I18n.config, I18nProxy.new(I18n.config, lookup_context)
|
||||
super
|
||||
ensure
|
||||
|
|
|
@ -118,7 +118,7 @@ module ActionView
|
|||
end
|
||||
end
|
||||
|
||||
def url_options #:nodoc:
|
||||
def url_options # :nodoc:
|
||||
return super unless controller.respond_to?(:url_options)
|
||||
controller.url_options
|
||||
end
|
||||
|
|
|
@ -4,13 +4,13 @@ require "active_support/core_ext/enumerable"
|
|||
|
||||
module ActionView
|
||||
# = Action View Errors
|
||||
class ActionViewError < StandardError #:nodoc:
|
||||
class ActionViewError < StandardError # :nodoc:
|
||||
end
|
||||
|
||||
class EncodingError < StandardError #:nodoc:
|
||||
class EncodingError < StandardError # :nodoc:
|
||||
end
|
||||
|
||||
class WrongEncodingError < EncodingError #:nodoc:
|
||||
class WrongEncodingError < EncodingError # :nodoc:
|
||||
def initialize(string, encoding)
|
||||
@string, @encoding = string, encoding
|
||||
end
|
||||
|
@ -26,7 +26,7 @@ module ActionView
|
|||
end
|
||||
end
|
||||
|
||||
class MissingTemplate < ActionViewError #:nodoc:
|
||||
class MissingTemplate < ActionViewError # :nodoc:
|
||||
attr_reader :path, :paths, :prefixes, :partial
|
||||
|
||||
def initialize(paths, path, prefixes, partial, details, *)
|
||||
|
@ -150,7 +150,7 @@ module ActionView
|
|||
# The Template::Error exception is raised when the compilation or rendering of the template
|
||||
# fails. This exception then gathers a bunch of intimate details and uses it to report a
|
||||
# precise exception message.
|
||||
class Error < ActionViewError #:nodoc:
|
||||
class Error < ActionViewError # :nodoc:
|
||||
SOURCE_CODE_RADIUS = 3
|
||||
|
||||
# Override to prevent #cause resetting during re-raise.
|
||||
|
@ -229,7 +229,7 @@ module ActionView
|
|||
|
||||
TemplateError = Template::Error
|
||||
|
||||
class SyntaxErrorInTemplate < TemplateError #:nodoc:
|
||||
class SyntaxErrorInTemplate < TemplateError # :nodoc:
|
||||
def initialize(template, offending_code_string)
|
||||
@offending_code_string = offending_code_string
|
||||
super(template)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
# = Action View Template Handlers
|
||||
class Template #:nodoc:
|
||||
module Handlers #:nodoc:
|
||||
class Template # :nodoc:
|
||||
module Handlers # :nodoc:
|
||||
autoload :Raw, "action_view/template/handlers/raw"
|
||||
autoload :ERB, "action_view/template/handlers/erb"
|
||||
autoload :Html, "action_view/template/handlers/html"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
# = Action View HTML Template
|
||||
class Template #:nodoc:
|
||||
class HTML #:nodoc:
|
||||
class Template # :nodoc:
|
||||
class HTML # :nodoc:
|
||||
attr_reader :type
|
||||
|
||||
def initialize(string, type)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView #:nodoc:
|
||||
class Template #:nodoc:
|
||||
class Inline < Template #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
class Template # :nodoc:
|
||||
class Inline < Template # :nodoc:
|
||||
# This finalizer is needed (and exactly with a proc inside another proc)
|
||||
# otherwise templates leak in development.
|
||||
Finalizer = proc do |method_name, mod| # :nodoc:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
# = Action View RawFile Template
|
||||
class Template #:nodoc:
|
||||
class RawFile #:nodoc:
|
||||
class Template # :nodoc:
|
||||
class RawFile # :nodoc:
|
||||
attr_accessor :type, :format
|
||||
|
||||
def initialize(filename)
|
||||
|
|
|
@ -50,7 +50,7 @@ module ActionView
|
|||
end
|
||||
|
||||
# Threadsafe template cache
|
||||
class Cache #:nodoc:
|
||||
class Cache # :nodoc:
|
||||
class SmallCache < Concurrent::Map
|
||||
def initialize(options = {})
|
||||
super(options.merge(initial_capacity: 2))
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
# = Action View Text Template
|
||||
class Template #:nodoc:
|
||||
class Text #:nodoc:
|
||||
class Template # :nodoc:
|
||||
class Text # :nodoc:
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(string)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require "active_support/core_ext/module/attribute_accessors"
|
||||
|
||||
module ActionView
|
||||
class Template #:nodoc:
|
||||
class Template # :nodoc:
|
||||
module Types
|
||||
class Type
|
||||
SET = Struct.new(:symbols).new([ :html, :text, :js, :css, :xml, :json ])
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require "action_view/template/resolver"
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module ActionView # :nodoc:
|
||||
# Use FixtureResolver in your tests to simulate the presence of files on the
|
||||
# file system. This is used internally by Rails' own test suite, and is
|
||||
# useful for testing extensions that have no way of knowing what the file
|
||||
|
|
|
@ -7,7 +7,7 @@ module ActiveJob
|
|||
#
|
||||
# Wraps the original exception raised as +cause+.
|
||||
class DeserializationError < StandardError
|
||||
def initialize #:nodoc:
|
||||
def initialize # :nodoc:
|
||||
super("Error while trying to deserialize arguments: #{$!.message}")
|
||||
set_backtrace $!.backtrace
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ require "active_job/instrumentation"
|
|||
require "active_job/timezones"
|
||||
require "active_job/translation"
|
||||
|
||||
module ActiveJob #:nodoc:
|
||||
module ActiveJob # :nodoc:
|
||||
# = Active Job
|
||||
#
|
||||
# Active Job objects can be configured to work with different backend
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActiveJob
|
||||
class ConfiguredJob #:nodoc:
|
||||
class ConfiguredJob # :nodoc:
|
||||
def initialize(job_class, options = {})
|
||||
@options = options
|
||||
@job_class = job_class
|
||||
|
|
|
@ -18,7 +18,7 @@ module ActiveJob
|
|||
job_or_instantiate(...).perform_now
|
||||
end
|
||||
|
||||
def execute(job_data) #:nodoc:
|
||||
def execute(job_data) # :nodoc:
|
||||
ActiveJob::Callbacks.run_callbacks(:execute) do
|
||||
job = deserialize(job_data)
|
||||
job.perform_now
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActiveJob
|
||||
module Instrumentation #:nodoc:
|
||||
module Instrumentation # :nodoc:
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue