Replace all occurrences of '<tt>(\w+::\w+)</tt>' with '+$1+'

E.g.:

* <tt>ActiveRecord::Base</tt> -> +ActiveRecord::Base+

Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
Co-authored-by: Petrik de Heus <petrik@deheus.net>
This commit is contained in:
zzak 2023-05-25 06:52:32 +09:00
parent e579afb16d
commit e3c73fd183
No known key found for this signature in database
GPG Key ID: 213927DFCF4FF102
89 changed files with 192 additions and 192 deletions

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActionCable
# Returns the currently loaded version of Action Cable as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Cable as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActionCable
# Returns the currently loaded version of Action Cable as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Cable as a +Gem::Version+.
def self.version
gem_version
end

@ -5,7 +5,7 @@
# web request.
#
# If an inbound email does not, against the rfc822 mandate, specify a Message-ID, one will be generated
# using the approach from <tt>Mail::MessageIdField</tt>.
# using the approach from +Mail::MessageIdField+.
module ActionMailbox::InboundEmail::MessageId
extend ActiveSupport::Concern

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActionMailbox
# Returns the currently loaded version of Action Mailbox as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Mailbox as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActionMailbox
# Returns the currently loaded version of Action Mailbox as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Mailbox as a +Gem::Version+.
def self.version
gem_version
end

@ -78,7 +78,7 @@ Or you can just chain the methods together like:
It is possible to set default values that will be used in every method in your
Action Mailer class. To implement this functionality, you just call the public
class method +default+ which you get for free from <tt>ActionMailer::Base</tt>.
class method +default+ which you get for free from ActionMailer::Base.
This method accepts a Hash as the parameter. You can use any of the headers,
email messages have, like +:from+ as the key. You can also pass in a string as
the key, like "Content-Type", but Action Mailer does this out of the box for you,

@ -21,7 +21,7 @@ module ActionMailer
# $ bin/rails generate mailer Notifier
#
# The generated model inherits from <tt>ApplicationMailer</tt> which in turn
# inherits from <tt>ActionMailer::Base</tt>. A mailer model defines methods
# inherits from +ActionMailer::Base+. A mailer model defines methods
# used to generate an email message. In these methods, you can set up variables to be used in
# the mailer views, options on the mail itself such as the <tt>:from</tt> address, and attachments.
#
@ -58,7 +58,7 @@ module ActionMailer
#
# * <tt>mail</tt> - Allows you to specify email to be sent.
#
# The hash passed to the mail method allows you to specify any header that a <tt>Mail::Message</tt>
# The hash passed to the mail method allows you to specify any header that a +Mail::Message+
# will accept (any valid email header including optional fields).
#
# The +mail+ method, if not passed a block, will inspect your views and send all the views with
@ -152,7 +152,7 @@ module ActionMailer
# mail.deliver_now # generates and sends the email now
#
# The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call
# your method to generate the mail. If you want direct access to the delegator, or <tt>Mail::Message</tt>,
# your method to generate the mail. If you want direct access to the delegator, or +Mail::Message+,
# you can call the <tt>message</tt> method on the ActionMailer::MessageDelivery object.
#
# NotifierMailer.welcome(User.first).message # => a Mail::Message object
@ -265,7 +265,7 @@ module ActionMailer
# An interceptor class must implement the <tt>:delivering_email(message)</tt> method which will be
# called before the email is sent, allowing you to make modifications to the email before it hits
# the delivery agents. Your class should make any needed modifications directly to the passed
# in <tt>Mail::Message</tt> instance.
# in +Mail::Message+ instance.
#
# = Default Hash
#
@ -276,15 +276,15 @@ module ActionMailer
# default sender: 'system@example.com'
# end
#
# You can pass in any header value that a <tt>Mail::Message</tt> accepts. Out of the box,
# <tt>ActionMailer::Base</tt> sets the following:
# You can pass in any header value that a +Mail::Message+ accepts. Out of the box,
# +ActionMailer::Base+ sets the following:
#
# * <tt>mime_version: "1.0"</tt>
# * <tt>charset: "UTF-8"</tt>
# * <tt>content_type: "text/plain"</tt>
# * <tt>parts_order: [ "text/plain", "text/enriched", "text/html" ]</tt>
#
# <tt>parts_order</tt> and <tt>charset</tt> are not actually valid <tt>Mail::Message</tt> header fields,
# <tt>parts_order</tt> and <tt>charset</tt> are not actually valid +Mail::Message+ header fields,
# but Action Mailer translates them appropriately and sets the correct values.
#
# As you can pass in any header, you need to either quote the header as a string, or pass it in as
@ -385,7 +385,7 @@ module ActionMailer
# end
# end
#
# Methods must return a <tt>Mail::Message</tt> object which can be generated by calling the mailer
# Methods must return a +Mail::Message+ object which can be generated by calling the mailer
# method without the additional <tt>deliver_now</tt> / <tt>deliver_later</tt>. The location of the
# mailer preview directories can be configured using the <tt>preview_paths</tt> option which has a default
# of <tt>test/mailers/previews</tt>:
@ -587,11 +587,11 @@ def default(value = nil)
# config.action_mailer.default_options = { from: "no-reply@example.org" }
alias :default_options= :default
# Wraps an email delivery inside of <tt>ActiveSupport::Notifications</tt> instrumentation.
# Wraps an email delivery inside of ActiveSupport::Notifications instrumentation.
#
# This method is actually called by the <tt>Mail::Message</tt> object itself
# 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
# This method is actually called by the +Mail::Message+ object itself
# through a callback when you call <tt>:deliver</tt> on the +Mail::Message+,
# calling +deliver_mail+ directly and passing a +Mail::Message+ will do
# nothing except tell the logger you sent the email.
def deliver_mail(mail) # :nodoc:
ActiveSupport::Notifications.instrument("deliver.action_mailer") do |payload|
@ -685,18 +685,18 @@ def email_address_with_name(address, name)
self.class.email_address_with_name(address, name)
end
# Allows you to pass random and unusual headers to the new <tt>Mail::Message</tt>
# Allows you to pass random and unusual headers to the new +Mail::Message+
# object which will add them to itself.
#
# headers['X-Special-Domain-Specific-Header'] = "SecretValue"
#
# You can also pass a hash into headers of header field names and values,
# which will then be set on the <tt>Mail::Message</tt> object:
# which will then be set on the +Mail::Message+ object:
#
# headers 'X-Special-Domain-Specific-Header' => "SecretValue",
# 'In-Reply-To' => incoming.message_id
#
# The resulting <tt>Mail::Message</tt> will have the following in its header:
# The resulting +Mail::Message+ will have the following in its header:
#
# X-Special-Domain-Specific-Header: SecretValue
#
@ -820,7 +820,7 @@ def _raise_error
# templates in the view paths using by default the mailer name and the
# method name that it is being called from, it will then create parts for
# each of these templates intelligently, making educated guesses on correct
# content type and sequence, and return a fully prepared <tt>Mail::Message</tt>
# content type and sequence, and return a fully prepared +Mail::Message+
# ready to call <tt>:deliver</tt> on to send.
#
# For example:

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActionMailer
# Returns the currently loaded version of Action Mailer as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Mailer as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -5,7 +5,7 @@
module ActionMailer
# = Action Mailer \MailDeliveryJob
#
# The <tt>ActionMailer::MailDeliveryJob</tt> class is used when you
# The +ActionMailer::MailDeliveryJob+ class is used when you
# want to send emails outside of the request-response cycle. It supports
# sending either parameterized or normal mail.
#

@ -5,11 +5,11 @@
module ActionMailer
# = Action Mailer \MessageDelivery
#
# The <tt>ActionMailer::MessageDelivery</tt> class is used by
# The +ActionMailer::MessageDelivery+ class is used by
# ActionMailer::Base when creating a new mailer.
# <tt>MessageDelivery</tt> is a wrapper (+Delegator+ subclass) around a lazy
# created <tt>Mail::Message</tt>. You can get direct access to the
# <tt>Mail::Message</tt>, deliver the email or schedule the email to be sent
# created +Mail::Message+. You can get direct access to the
# +Mail::Message+, deliver the email or schedule the email to be sent
# through Active Job.
#
# Notifier.welcome(User.first) # an ActionMailer::MessageDelivery object
@ -64,7 +64,7 @@ def processed?
# * <tt>:queue</tt> - Enqueue the email on the specified queue
# * <tt>:priority</tt> - Enqueues the email with the specified priority
#
# By default, the email will be enqueued using <tt>ActionMailer::MailDeliveryJob</tt> on
# By default, the email will be enqueued using ActionMailer::MailDeliveryJob on
# the default queue. Mailer classes can customize the queue name used for the default
# job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job
# by assigning a +delivery_job+. When a custom job is used, it controls the queue name.
@ -91,7 +91,7 @@ def deliver_later!(options = {})
# * <tt>:queue</tt> - Enqueue the email on the specified queue.
# * <tt>:priority</tt> - Enqueues the email with the specified priority
#
# By default, the email will be enqueued using <tt>ActionMailer::MailDeliveryJob</tt> on
# By default, the email will be enqueued using ActionMailer::MailDeliveryJob on
# the default queue. Mailer classes can customize the queue name used for the default
# job by assigning a +deliver_later_queue_name+ class variable, or provide a custom job
# by assigning a +delivery_job+. When a custom job is used, it controls the queue name.

@ -4,7 +4,7 @@
module ActionMailer
# Returns the currently loaded version of Action Mailer as a
# <tt>Gem::Version</tt>.
# +Gem::Version+.
def self.version
gem_version
end

@ -72,7 +72,7 @@ def inherited(klass) # :nodoc:
# instance methods on that abstract class. Public instance methods of
# a controller would normally be considered action methods, so methods
# declared on abstract classes are being removed.
# (<tt>ActionController::Metal</tt> and ActionController::Base are defined as abstract)
# (ActionController::Metal and ActionController::Base are defined as abstract)
def internal_methods
controller = self

@ -21,7 +21,7 @@ module ActionController
# your application, they're just not part of the default API controller stack.
#
# Normally, +ApplicationController+ is the only controller that inherits from
# <tt>ActionController::API</tt>. All other controllers in turn inherit from
# +ActionController::API+. All other controllers in turn inherit from
# +ApplicationController+.
#
# A sample controller could look like this:
@ -64,7 +64,7 @@ module ActionController
#
# In some scenarios you may want to add back some functionality provided by
# ActionController::Base that is not present by default in
# <tt>ActionController::API</tt>, for instance <tt>MimeResponds</tt>. This
# +ActionController::API+, for instance <tt>MimeResponds</tt>. This
# module gives you the <tt>respond_to</tt> method. Adding it is quite simple,
# you just need to include the module in a specific controller or in
# +ApplicationController+ in case you want it available in your entire
@ -87,7 +87,7 @@ module ActionController
#
# Make sure to check the modules included in ActionController::Base
# if you want to use any other functionality that is not provided
# by <tt>ActionController::API</tt> out of the box.
# by +ActionController::API+ out of the box.
class API < Metal
abstract!

@ -11,7 +11,7 @@ module ActionController
# on request and then either it renders a template or redirects to another action. An action is defined as a public method
# on the controller, which will automatically be made accessible to the web-server through \Rails Routes.
#
# By default, only the ApplicationController in a \Rails application inherits from <tt>ActionController::Base</tt>. All other
# By default, only the ApplicationController in a \Rails application inherits from +ActionController::Base+. All other
# controllers inherit from ApplicationController. This gives you one class to configure things such as
# request forgery protection and filtering of sensitive request parameters.
#

@ -62,7 +62,7 @@ def build_middleware(klass, args, block)
# = Action Controller \Metal
#
# <tt>ActionController::Metal</tt> is the simplest possible controller, providing a
# +ActionController::Metal+ is the simplest possible controller, providing a
# valid Rack interface without the additional niceties provided by
# ActionController::Base.
#
@ -84,7 +84,7 @@ def build_middleware(klass, args, block)
#
# == Rendering Helpers
#
# <tt>ActionController::Metal</tt> by default provides no utilities for rendering
# +ActionController::Metal+ by default provides no utilities for rendering
# views, partials, or other responses aside from explicitly calling of
# <tt>response_body=</tt>, <tt>content_type=</tt>, and <tt>status=</tt>. To
# add the render helpers you're used to having in a normal controller, you

@ -19,12 +19,12 @@ module ActionController
# Second, if we DON'T find a template but the controller action does have
# templates for other formats, variants, etc., then we trust that you meant
# to provide a template for this response, too, and we raise
# <tt>ActionController::UnknownFormat</tt> with an explanation.
# ActionController::UnknownFormat with an explanation.
#
# Third, if we DON'T find a template AND the request is a page load in a web
# browser (technically, a non-XHR GET request for an HTML response) where
# you reasonably expect to have rendered a template, then we raise
# <tt>ActionController::MissingExactTemplate</tt> with an explanation.
# ActionController::MissingExactTemplate with an explanation.
#
# Finally, if we DON'T find a template AND the request isn't a browser page
# load, then we implicitly respond with <tt>204 No Content</tt>.

@ -70,7 +70,7 @@ module ActionController
# class Admin::UsersController < ApplicationController
# end
#
# will try to check if <tt>Admin::User</tt> or +User+ model exists, and use it to
# will try to check if +Admin::User+ or +User+ model exists, and use it to
# determine the wrapper key respectively. If both models don't exist,
# it will then fallback to use +user+ as the key.
#

@ -100,7 +100,7 @@ module ClassMethods
#
# Both ActionController::Base and ActionController::API
# include ActionController::Renderers::All, making all renderers
# available in the controller. See <tt>Renderers::RENDERERS</tt> and <tt>Renderers.add</tt>.
# available in the controller. See Renderers::RENDERERS and Renderers.add.
#
# Since ActionController::Metal controllers cannot render, the controller
# must include AbstractController::Rendering, ActionController::Rendering,

@ -36,7 +36,7 @@ class InvalidCrossOriginRequest < ActionControllerError # :nodoc:
#
# Subclasses of ActionController::Base are protected by default with the
# <tt>:exception</tt> strategy, which raises an
# <tt>ActionController::InvalidAuthenticityToken</tt> error on unverified requests.
# ActionController::InvalidAuthenticityToken error on unverified requests.
#
# APIs may want to disable this behavior since they are typically designed to be
# state-less: that is, the request API client handles the session instead of Rails.

@ -142,10 +142,10 @@ module ActionController # :nodoc:
#
# Middlewares that need to manipulate the body won't work with streaming.
# You should disable those middlewares whenever streaming in development
# or production. For instance, <tt>Rack::Bug</tt> won't work when streaming as it
# or production. For instance, +Rack::Bug+ won't work when streaming as it
# needs to inject contents in the HTML body.
#
# Also <tt>Rack::Cache</tt> won't work with streaming as it does not support
# Also +Rack::Cache+ won't work with streaming as it does not support
# streaming bodies yet. Whenever streaming +Cache-Control+ is automatically
# set to "no-cache".
#

@ -130,7 +130,7 @@ class InvalidParameterKey < ArgumentError
# environment they should only be set once at boot-time and never mutated at
# runtime.
#
# You can fetch values of <tt>ActionController::Parameters</tt> using either
# You can fetch values of +ActionController::Parameters+ using either
# <tt>:key</tt> or <tt>"key"</tt>.
#
# params = ActionController::Parameters.new(key: "value")
@ -222,7 +222,7 @@ def nested_attribute?(key, value) # :nodoc:
end
end
# Returns a new <tt>ActionController::Parameters</tt> instance.
# Returns a new +ActionController::Parameters+ instance.
# Also, sets the +permitted+ attribute to the default value of
# <tt>ActionController::Parameters.permit_all_parameters</tt>.
#
@ -498,7 +498,7 @@ def require(key)
alias :required :require
# Returns a new <tt>ActionController::Parameters</tt> instance that
# Returns a new +ActionController::Parameters+ instance that
# includes only the given +filters+ and sets the +permitted+ attribute
# for the object to +true+. This is useful for limiting which attributes
# should be allowed for mass updating.
@ -683,7 +683,7 @@ def dig(*keys)
@parameters.dig(*keys)
end
# Returns a new <tt>ActionController::Parameters</tt> instance that
# Returns a new +ActionController::Parameters+ instance that
# includes only the given +keys+. If the given +keys+
# don't exist, returns an empty hash.
#
@ -694,14 +694,14 @@ def slice(*keys)
new_instance_with_inherited_permitted_status(@parameters.slice(*keys))
end
# Returns the current <tt>ActionController::Parameters</tt> instance which
# Returns the current +ActionController::Parameters+ instance which
# contains only the given +keys+.
def slice!(*keys)
@parameters.slice!(*keys)
self
end
# Returns a new <tt>ActionController::Parameters</tt> instance that
# Returns a new +ActionController::Parameters+ instance that
# filters out the given +keys+.
#
# params = ActionController::Parameters.new(a: 1, b: 2, c: 3)
@ -721,7 +721,7 @@ def extract!(*keys)
new_instance_with_inherited_permitted_status(@parameters.extract!(*keys))
end
# Returns a new <tt>ActionController::Parameters</tt> instance with the results of
# Returns a new +ActionController::Parameters+ instance with the results of
# running +block+ once for every value. The keys are unchanged.
#
# params = ActionController::Parameters.new(a: 1, b: 2, c: 3)
@ -735,14 +735,14 @@ def transform_values
end
# Performs values transformation and returns the altered
# <tt>ActionController::Parameters</tt> instance.
# +ActionController::Parameters+ instance.
def transform_values!
return to_enum(:transform_values!) unless block_given?
@parameters.transform_values! { |v| yield convert_value_to_parameters(v) }
self
end
# Returns a new <tt>ActionController::Parameters</tt> instance with the
# Returns a new +ActionController::Parameters+ instance with the
# results of running +block+ once for every key. The values are unchanged.
def transform_keys(&block)
return to_enum(:transform_keys) unless block_given?
@ -752,14 +752,14 @@ def transform_keys(&block)
end
# Performs keys transformation and returns the altered
# <tt>ActionController::Parameters</tt> instance.
# +ActionController::Parameters+ instance.
def transform_keys!(&block)
return to_enum(:transform_keys!) unless block_given?
@parameters.transform_keys!(&block)
self
end
# Returns a new <tt>ActionController::Parameters</tt> instance with the
# Returns a new +ActionController::Parameters+ instance with the
# results of running +block+ once for every key. This includes the keys
# from the root hash and from all nested hashes and arrays. The values are unchanged.
def deep_transform_keys(&block)
@ -768,7 +768,7 @@ def deep_transform_keys(&block)
)
end
# Returns the same <tt>ActionController::Parameters</tt> instance with
# Returns the same +ActionController::Parameters+ instance with
# changed keys. This includes the keys from the root hash and from all
# nested hashes and arrays. The values are unchanged.
def deep_transform_keys!(&block)
@ -784,7 +784,7 @@ def delete(key, &block)
convert_value_to_parameters(@parameters.delete(key, &block))
end
# Returns a new <tt>ActionController::Parameters</tt> instance with only
# Returns a new +ActionController::Parameters+ instance with only
# items that the block evaluates to true.
def select(&block)
new_instance_with_inherited_permitted_status(@parameters.select(&block))
@ -797,7 +797,7 @@ def select!(&block)
end
alias_method :keep_if, :select!
# Returns a new <tt>ActionController::Parameters</tt> instance with items
# Returns a new +ActionController::Parameters+ instance with items
# that the block evaluates to true removed.
def reject(&block)
new_instance_with_inherited_permitted_status(@parameters.reject(&block))
@ -810,7 +810,7 @@ def reject!(&block)
end
alias_method :delete_if, :reject!
# Returns a new <tt>ActionController::Parameters</tt> instance with +nil+ values removed.
# Returns a new +ActionController::Parameters+ instance with +nil+ values removed.
def compact
new_instance_with_inherited_permitted_status(@parameters.compact)
end
@ -820,7 +820,7 @@ def compact!
self if @parameters.compact!
end
# Returns a new <tt>ActionController::Parameters</tt> instance without the blank values.
# Returns a new +ActionController::Parameters+ instance without the blank values.
# Uses Object#blank? for determining if a value is blank.
def compact_blank
reject { |_k, v| v.blank? }
@ -840,12 +840,12 @@ def has_value?(value)
alias value? has_value?
# Returns values that were assigned to the given +keys+. Note that all the
# +Hash+ objects will be converted to <tt>ActionController::Parameters</tt>.
# +Hash+ objects will be converted to +ActionController::Parameters+.
def values_at(*keys)
convert_value_to_parameters(@parameters.values_at(*keys))
end
# Returns a new <tt>ActionController::Parameters</tt> instance with all keys from
# Returns a new +ActionController::Parameters+ instance with all keys from
# +other_hash+ merged into current hash.
def merge(other_hash)
new_instance_with_inherited_permitted_status(
@ -853,14 +853,14 @@ def merge(other_hash)
)
end
# Returns the current <tt>ActionController::Parameters</tt> instance with
# Returns the current +ActionController::Parameters+ instance with
# +other_hash+ merged into current hash.
def merge!(other_hash)
@parameters.merge!(other_hash.to_h)
self
end
# Returns a new <tt>ActionController::Parameters</tt> instance with all keys
# Returns a new +ActionController::Parameters+ instance with all keys
# from current hash merged into +other_hash+.
def reverse_merge(other_hash)
new_instance_with_inherited_permitted_status(
@ -869,7 +869,7 @@ def reverse_merge(other_hash)
end
alias_method :with_defaults, :reverse_merge
# Returns the current <tt>ActionController::Parameters</tt> instance with
# Returns the current +ActionController::Parameters+ instance with
# current hash merged into +other_hash+.
def reverse_merge!(other_hash)
@parameters.merge!(other_hash.to_h) { |key, left, right| left }

@ -292,7 +292,7 @@ def response_code
@status
end
# Returns a string to ensure compatibility with <tt>Net::HTTPResponse</tt>.
# Returns a string to ensure compatibility with +Net::HTTPResponse+.
def code
@status.to_s
end

@ -760,7 +760,7 @@ def map_method(method, args, &block)
# end
#
# This will create a number of routes for each of the posts and comments
# controller. For <tt>Admin::PostsController</tt>, Rails will create:
# controller. For +Admin::PostsController+, Rails will create:
#
# GET /admin/posts
# GET /admin/posts/new
@ -771,7 +771,7 @@ def map_method(method, args, &block)
# DELETE /admin/posts/1
#
# If you want to route /posts (without the prefix /admin) to
# <tt>Admin::PostsController</tt>, you could use
# +Admin::PostsController+, you could use
#
# scope module: "admin" do
# resources :posts
@ -820,7 +820,7 @@ module Scoping
#
# Takes same options as <tt>Base#match</tt> and <tt>Resources#resources</tt>.
#
# # route /posts (without the prefix /admin) to <tt>Admin::PostsController</tt>
# # route /posts (without the prefix /admin) to +Admin::PostsController+
# scope module: "admin" do
# resources :posts
# end
@ -929,7 +929,7 @@ def controller(controller)
# resources :posts
# end
#
# # maps to <tt>Sekret::PostsController</tt> rather than <tt>Admin::PostsController</tt>
# # maps to +Sekret::PostsController+ rather than +Admin::PostsController+
# namespace :admin, module: "sekret" do
# resources :posts
# end
@ -1462,7 +1462,7 @@ def resource(*resources, &block)
#
# === Examples
#
# # routes call <tt>Admin::PostsController</tt>
# # routes call +Admin::PostsController+
# resources :posts, module: "admin"
#
# # resource actions are at /admin/posts.

@ -51,7 +51,7 @@ module ActionDispatch
# driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
# end
#
# By default, <tt>ActionDispatch::SystemTestCase</tt> is driven by the
# By default, +ActionDispatch::SystemTestCase+ is driven by the
# Selenium driver, with the Chrome browser, and a browser size of 1400x1400.
#
# Changing the driver configuration options is easy. Let's say you want to use
@ -106,7 +106,7 @@ module ActionDispatch
# end
# end
#
# Because <tt>ActionDispatch::SystemTestCase</tt> is a shim between Capybara
# Because +ActionDispatch::SystemTestCase+ is a shim between Capybara
# and Rails, any driver that is supported by Capybara is supported by system
# tests as long as you include the required gems and files.
class SystemTestCase < ActiveSupport::TestCase

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActionPack
# Returns the currently loaded version of Action Pack as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Pack as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActionPack
# Returns the currently loaded version of Action Pack as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Pack as a +Gem::Version+.
def self.version
gem_version
end

@ -3,7 +3,7 @@
module ActionText
# = Action Text \Attachable
#
# Include this module to make a record attachable to an <tt>ActionText::Content</tt>.
# Include this module to make a record attachable to an ActionText::Content.
#
# class Person < ApplicationRecord
# include ActionText::Attachable
@ -19,7 +19,7 @@ module Attachable
LOCATOR_NAME = "attachable"
class << self
# Extracts the <tt>ActionText::Attachable</tt> from the attachment HTML node:
# Extracts the +ActionText::Attachable+ from the attachment HTML node:
#
# person = Person.create! name: "Javan"
# html = %Q(<action-text-attachment sgid="#{person.attachable_sgid}"></action-text-attachment>)

@ -3,13 +3,13 @@
module ActionText
# = Action Text \Content
#
# The <tt>ActionText::Content</tt> class wraps an HTML fragment to add support for
# The +ActionText::Content+ class wraps an HTML fragment to add support for
# parsing, rendering and serialization. It can be used to extract links and
# attachments, convert the fragment to plain text, or serialize the fragment
# to the database.
#
# The <tt>ActionText::RichText</tt> record serializes the `body` attribute as
# <tt>ActionText::Content</tt>.
# The ActionText::RichText record serializes the `body` attribute as
# +ActionText::Content+.
#
# class Message < ActiveRecord::Base
# has_rich_text :content
@ -53,7 +53,7 @@ def links
@links ||= fragment.find_all("a[href]").map { |a| a["href"] }.uniq
end
# Extracts <tt>ActionText::Attachment</tt>s from the HTML fragment:
# Extracts +ActionText::Attachment+s from the HTML fragment:
#
# attachable = ActiveStorage::Blob.first
# html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>)
@ -75,7 +75,7 @@ def gallery_attachments
@gallery_attachments ||= attachment_galleries.flat_map(&:attachments)
end
# Extracts <tt>ActionText::Attachable</tt>s from the HTML fragment:
# Extracts +ActionText::Attachable+s from the HTML fragment:
#
# attachable = ActiveStorage::Blob.first
# html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>)

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActionText
# Returns the currently loaded version of Action Text as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Text as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActionText
# Returns the currently loaded version of Action Text as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action Text as a +Gem::Version+.
def self.version
gem_version
end

@ -11,7 +11,7 @@ class << self
#
# * <tt>name</tt> - Template name
# * <tt>format</tt> - Template format
# * <tt>finder</tt> - An instance of <tt>ActionView::LookupContext</tt>
# * +finder+ - An instance of ActionView::LookupContext
# * <tt>dependencies</tt> - An array of dependent views
def digest(name:, format: nil, finder:, dependencies: nil)
if dependencies.nil? || dependencies.empty?

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActionView
# Returns the currently loaded version of Action View as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action View as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActionView
# Returns the currently loaded version of Action View as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Action View as a +Gem::Version+.
def self.version
gem_version
end

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActiveJob
# Returns the currently loaded version of Active Job as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Active Job as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -14,7 +14,7 @@ def adapter_name(adapter) # :nodoc:
# = Active Job Queue adapter
#
# The <tt>ActiveJob::QueueAdapter</tt> module is used to load the
# The +ActiveJob::QueueAdapter+ module is used to load the
# correct adapter. The default queue adapter is the +:async+ queue.
module QueueAdapter # :nodoc:
extend ActiveSupport::Concern

@ -37,9 +37,9 @@ def enqueue_at(job, timestamp) # :nodoc:
qc_job
end
# Builds a <tt>QC::Queue</tt> object to schedule jobs on.
# Builds a +QC::Queue+ object to schedule jobs on.
#
# If you have a custom <tt>QC::Queue</tt> subclass you'll need to subclass
# If you have a custom +QC::Queue+ subclass you'll need to subclass
# <tt>ActiveJob::QueueAdapters::QueueClassicAdapter</tt> and override the
# <tt>build_queue</tt> method.
def build_queue(queue_name)

@ -5,7 +5,7 @@
module ActiveJob
# = Active Job \Serializers
#
# The <tt>ActiveJob::Serializers</tt> module is used to store a list of known serializers
# The +ActiveJob::Serializers+ module is used to store a list of known serializers
# and to add new ones. It also has helpers to serialize/deserialize objects.
module Serializers # :nodoc:
extend ActiveSupport::Autoload
@ -28,7 +28,7 @@ module Serializers # :nodoc:
class << self
# Returns serialized representative of the passed object.
# Will look up through all known serializers.
# Raises <tt>ActiveJob::SerializationError</tt> if it can't find a proper serializer.
# Raises ActiveJob::SerializationError if it can't find a proper serializer.
def serialize(argument)
serializer = serializers.detect { |s| s.serialize?(argument) }
raise SerializationError.new("Unsupported argument type: #{argument.class.name}") unless serializer

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActiveJob
# Returns the currently loaded version of Active Job as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Active Job as a +Gem::Version+.
def self.version
gem_version
end

@ -16,7 +16,7 @@ Model solves this by defining an explicit API. You can read more about the
API in <tt>ActiveModel::Lint::Tests</tt>.
Active Model provides a default module that implements the basic API required
to integrate with Action Pack out of the box: <tt>ActiveModel::API</tt>.
to integrate with Action Pack out of the box: ActiveModel::API.
class Person
include ActiveModel::API
@ -32,7 +32,7 @@ to integrate with Action Pack out of the box: <tt>ActiveModel::API</tt>.
It includes model name introspections, conversions, translations and
validations, resulting in a class suitable to be used with Action Pack.
See <tt>ActiveModel::API</tt> for more examples.
See ActiveModel::API for more examples.
Active Model also provides the following functionality to have ORM-like
behavior out of the box:
@ -156,7 +156,7 @@ behavior out of the box:
* Making objects serializable
<tt>ActiveModel::Serialization</tt> provides a standard interface for your object
ActiveModel::Serialization provides a standard interface for your object
to provide +to_json+ serialization.
class SerialPerson

@ -20,7 +20,7 @@ module ActiveModel
# person.name # => "bob"
# person.age # => "18"
#
# Note that, by default, <tt>ActiveModel::API</tt> implements <tt>persisted?</tt>
# Note that, by default, +ActiveModel::API+ implements <tt>persisted?</tt>
# to return +false+, which is the most common case. You may want to override
# it in your class to simulate a different scenario:
#
@ -54,7 +54,7 @@ module ActiveModel
# person.omg # => true
#
# For more detailed information on other functionalities available, please
# refer to the specific modules included in <tt>ActiveModel::API</tt>
# refer to the specific modules included in +ActiveModel::API+
# (see below).
module API
extend ActiveSupport::Concern

@ -10,7 +10,7 @@ module AttributeAssignment
# keys matching the attribute names.
#
# If the passed hash responds to <tt>permitted?</tt> method and the return value
# of this method is +false+ an <tt>ActiveModel::ForbiddenAttributesError</tt>
# of this method is +false+ an ActiveModel::ForbiddenAttributesError
# exception is raised.
#
# class Cat

@ -18,10 +18,10 @@ class MissingAttributeError < NoMethodError
# = Active \Model \Attribute \Methods
#
# Provides a way to add prefixes and suffixes to your methods as
# well as handling the creation of <tt>ActiveRecord::Base</tt>-like
# well as handling the creation of ActiveRecord::Base - like
# class methods such as +table_name+.
#
# The requirements to implement <tt>ActiveModel::AttributeMethods</tt> are to:
# The requirements to implement +ActiveModel::AttributeMethods+ are to:
#
# * <tt>include ActiveModel::AttributeMethods</tt> in your class.
# * Call each of its methods you want to add, such as +attribute_method_suffix+
@ -245,7 +245,7 @@ def attribute_alias(name)
end
# Declares the attributes that should be prefixed and suffixed by
# <tt>ActiveModel::AttributeMethods</tt>.
# +ActiveModel::AttributeMethods+.
#
# To use, pass attribute names (as strings or symbols). Be sure to declare
# +define_attribute_methods+ after you define any prefix, suffix, or affix
@ -274,7 +274,7 @@ def define_attribute_methods(*attr_names)
end
# Declares an attribute that should be prefixed and suffixed by
# <tt>ActiveModel::AttributeMethods</tt>.
# +ActiveModel::AttributeMethods+.
#
# To use, pass an attribute name (as string or symbol). Be sure to declare
# +define_attribute_method+ after you define any prefix, suffix or affix

@ -11,7 +11,7 @@ module ActiveModel
# Like the Active Record methods, the callback chain is aborted as soon as
# one of the methods throws +:abort+.
#
# First, extend <tt>ActiveModel::Callbacks</tt> from the class you are creating:
# First, extend +ActiveModel::Callbacks+ from the class you are creating:
#
# class MyModel
# extend ActiveModel::Callbacks

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActiveModel
# Returns the currently loaded version of \Active \Model as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of \Active \Model as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -37,7 +37,7 @@ module ActiveModel
# person.omg # => true
#
# For more detailed information on other functionalities available, please
# refer to the specific modules included in <tt>ActiveModel::Model</tt>
# refer to the specific modules included in +ActiveModel::Model+
# (see below).
module Model
extend ActiveSupport::Concern

@ -33,8 +33,8 @@ module ActiveModel
# at the private method +read_attribute_for_serialization+.
#
# ActiveModel::Serializers::JSON module automatically includes
# the <tt>ActiveModel::Serialization</tt> module, so there is no need to
# explicitly include <tt>ActiveModel::Serialization</tt>.
# the +ActiveModel::Serialization+ module, so there is no need to
# explicitly include +ActiveModel::Serialization+.
#
# A minimal implementation including JSON would be:
#

@ -19,9 +19,9 @@ module Type
# strings:
#
# - Blank strings are cast to +nil+.
# - <tt>"Infinity"</tt> is cast to <tt>Float::INFINITY</tt>.
# - <tt>"Infinity"</tt> is cast to +Float::INFINITY+.
# - <tt>"-Infinity"</tt> is cast to <tt>-Float::INFINITY</tt>.
# - <tt>"NaN"</tt> is cast to <tt>Float::NAN</tt>.
# - <tt>"NaN"</tt> is cast to +Float::NAN+.
#
# bag = BagOfCoffee.new
#

@ -31,7 +31,7 @@ module ActiveModel
# person.invalid? # => true
# person.errors.messages # => {first_name:["starts with z."]}
#
# Note that <tt>ActiveModel::Validations</tt> automatically adds an +errors+
# Note that +ActiveModel::Validations+ automatically adds an +errors+
# method to your instances initialized with a new ActiveModel::Errors
# object, so there is no need for you to do this manually.
module Validations

@ -130,7 +130,7 @@ def validates(*attributes)
# This method is used to define validations that cannot be corrected by end
# users and are considered exceptional. So each validator defined with bang
# or <tt>:strict</tt> option set to <tt>true</tt> will always raise
# <tt>ActiveModel::StrictValidationFailed</tt> instead of adding error
# ActiveModel::StrictValidationFailed instead of adding error
# when validation fails. See <tt>validates</tt> for more information about
# the validation itself.
#

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActiveModel
# Returns the currently loaded version of \Active \Model as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of \Active \Model as a +Gem::Version+.
def self.version
gem_version
end

@ -381,9 +381,9 @@ def association_instance_set(name, association)
# === A word of warning
#
# Don't create associations that have the same name as {instance methods}[rdoc-ref:ActiveRecord::Core] of
# <tt>ActiveRecord::Base</tt>. Since the association adds a method with that name to
# its model, using an association with the same name as one provided by <tt>ActiveRecord::Base</tt> will override the method inherited through <tt>ActiveRecord::Base</tt> and will break things.
# For instance, +attributes+ and +connection+ would be bad choices for association names, because those names already exist in the list of <tt>ActiveRecord::Base</tt> instance methods.
# +ActiveRecord::Base+. Since the association adds a method with that name to
# its model, using an association with the same name as one provided by +ActiveRecord::Base+ will override the method inherited through +ActiveRecord::Base+ and will break things.
# For instance, +attributes+ and +connection+ would be bad choices for association names, because those names already exist in the list of +ActiveRecord::Base+ instance methods.
#
# == Auto-generated methods
# See also Instance Public methods below for more details.
@ -1414,7 +1414,7 @@ module ClassMethods
# * <tt>:delete_all</tt> causes all the associated objects to be deleted directly from the database (so callbacks will not be executed).
# * <tt>:nullify</tt> causes the foreign keys to be set to +NULL+. Polymorphic type will also be nullified
# on polymorphic associations. Callbacks are not executed.
# * <tt>:restrict_with_exception</tt> causes an <tt>ActiveRecord::DeleteRestrictionError</tt> exception to be raised if there are any associated records.
# * <tt>:restrict_with_exception</tt> causes an ActiveRecord::DeleteRestrictionError exception to be raised if there are any associated records.
# * <tt>:restrict_with_error</tt> causes an error to be added to the owner if there are any associated objects.
#
# If using with the <tt>:through</tt> option, the association on the join model must be
@ -1586,7 +1586,7 @@ def has_many(name, scope = nil, **options, &extension)
# * <tt>:delete</tt> causes the associated object to be deleted directly from the database (so callbacks will not execute)
# * <tt>:nullify</tt> causes the foreign key to be set to +NULL+. Polymorphic type column is also nullified
# on polymorphic associations. Callbacks are not executed.
# * <tt>:restrict_with_exception</tt> causes an <tt>ActiveRecord::DeleteRestrictionError</tt> exception to be raised if there is an associated record
# * <tt>:restrict_with_exception</tt> causes an ActiveRecord::DeleteRestrictionError exception to be raised if there is an associated record
# * <tt>:restrict_with_error</tt> causes an error to be added to the owner if there is an associated object
#
# Note that <tt>:dependent</tt> option is ignored when using <tt>:through</tt> option.

@ -83,7 +83,7 @@ class Preloader # :nodoc:
# book's author, as well as that author's avatar.
#
# +:associations+ has the same format as the +:include+ method in
# <tt>ActiveRecord::QueryMethods</tt>. So +associations+ could look like this:
# +ActiveRecord::QueryMethods+. So +associations+ could look like this:
#
# :books
# [ :books, :author ]

@ -48,7 +48,7 @@ module ClassMethods
# +dump+ method may return +nil+ to serialize the value as +NULL+.
# * +type+ - Optional. What the type of the serialized object should be.
# * Attempting to serialize another type will raise an
# <tt>ActiveRecord::SerializationTypeMismatch</tt> error.
# ActiveRecord::SerializationTypeMismatch error.
# * If the column is +NULL+ or starting from a new record, the default value
# will set to +type.new+
# * +yaml+ - Optional. Yaml specific options. The allowed config is:

@ -350,7 +350,7 @@ def ===(object) # :nodoc:
object.is_a?(self)
end
# Returns an instance of <tt>Arel::Table</tt> loaded with the current table name.
# Returns an instance of +Arel::Table+ loaded with the current table name.
def arel_table # :nodoc:
@arel_table ||= Arel::Table.new(table_name, klass: self)
end

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActiveRecord
# Returns the currently loaded version of Active Record as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Active Record as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -10,7 +10,7 @@ module Integration
##
# :singleton-method:
# Indicates the format used to generate the timestamp in the cache key, if
# versioning is off. Accepts any of the symbols in <tt>Time::DATE_FORMATS</tt>.
# versioning is off. Accepts any of the symbols in +Time::DATE_FORMATS+.
#
# This is +:usec+, by default.
class_attribute :cache_timestamp_format, instance_writer: false, default: :usec

@ -6,7 +6,7 @@ module Locking
#
# Optimistic locking allows multiple users to access the same record for edits, and assumes a minimum of
# conflicts with the data. It does this by checking whether another process has made changes to a record since
# it was opened, an <tt>ActiveRecord::StaleObjectError</tt> exception is thrown if that has occurred
# it was opened, an ActiveRecord::StaleObjectError exception is thrown if that has occurred
# and the update is ignored.
#
# Check out <tt>ActiveRecord::Locking::Pessimistic</tt> for an alternative.

@ -362,7 +362,7 @@ def initialize
# == Irreversible transformations
#
# Some transformations are destructive in a manner that cannot be reversed.
# Migrations of that kind should raise an <tt>ActiveRecord::IrreversibleMigration</tt>
# Migrations of that kind should raise an ActiveRecord::IrreversibleMigration
# exception in their +down+ method.
#
# == Running migrations from within Rails
@ -401,7 +401,7 @@ def initialize
# wish to rollback last few migrations. <tt>bin/rails db:rollback STEP=2</tt> will rollback
# the latest two migrations.
#
# If any of the migrations throw an <tt>ActiveRecord::IrreversibleMigration</tt> exception,
# If any of the migrations throw an ActiveRecord::IrreversibleMigration exception,
# that step will fail and you'll have some manual work to do.
#
# == More examples
@ -527,7 +527,7 @@ def initialize
# as before.
#
# If a command cannot be reversed, an
# <tt>ActiveRecord::IrreversibleMigration</tt> exception will be raised when
# ActiveRecord::IrreversibleMigration exception will be raised when
# the migration is moving down.
#
# For a list of commands that are reversible, please see
@ -642,7 +642,7 @@ def nearest_delegate # :nodoc:
delegate || superclass.nearest_delegate
end
# Raises <tt>ActiveRecord::PendingMigrationError</tt> error if any migrations are pending.
# Raises ActiveRecord::PendingMigrationError error if any migrations are pending.
#
# This is deprecated in favor of +check_pending_migrations!+
def check_pending!(connection = ActiveRecord::Tasks::DatabaseTasks.migration_connection)
@ -659,7 +659,7 @@ def check_pending!(connection = ActiveRecord::Tasks::DatabaseTasks.migration_con
end
end
# Raises <tt>ActiveRecord::PendingMigrationError</tt> error if any migrations are pending
# Raises ActiveRecord::PendingMigrationError error if any migrations are pending
# for all database configurations in an environment.
def check_all_pending!
pending_migrations = []

@ -132,7 +132,7 @@ def insert(attributes, returning: nil, unique_by: nil, record_timestamps: nil)
#
# Consider a Book model where no duplicate ISBNs make sense, but if any
# row has an existing id, or is not unique by another unique index,
# <tt>ActiveRecord::RecordNotUnique</tt> is raised.
# ActiveRecord::RecordNotUnique is raised.
#
# Unique indexes can be identified by columns or name:
#
@ -194,7 +194,7 @@ def insert!(attributes, returning: nil, record_timestamps: nil)
# The +attributes+ parameter is an Array of Hashes. Every Hash determines
# the attributes for a single row and must have the same keys.
#
# Raises <tt>ActiveRecord::RecordNotUnique</tt> if any rows violate a
# Raises ActiveRecord::RecordNotUnique if any rows violate a
# unique index on the table. In that case, no rows are inserted.
#
# To skip duplicate rows, see #insert_all. To replace them, see #upsert_all.
@ -288,7 +288,7 @@ def upsert(attributes, on_duplicate: :update, returning: nil, unique_by: nil, re
#
# Consider a Book model where no duplicate ISBNs make sense, but if any
# row has an existing id, or is not unique by another unique index,
# <tt>ActiveRecord::RecordNotUnique</tt> is raised.
# ActiveRecord::RecordNotUnique is raised.
#
# Unique indexes can be identified by columns or name:
#

@ -51,7 +51,7 @@ def find_by_sql(sql, binds = [], preparable: nil, &block)
_load_from_sql(_query_by_sql(sql, binds, preparable: preparable), &block)
end
# Same as <tt>#find_by_sql</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#find_by_sql</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_find_by_sql(sql, binds = [], preparable: nil, &block)
_query_by_sql(sql, binds, preparable: preparable, async: true).then do |result|
_load_from_sql(result, &block)
@ -102,7 +102,7 @@ def count_by_sql(sql)
connection.select_value(sanitize_sql(sql), "#{name} Count").to_i
end
# Same as <tt>#count_by_sql</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#count_by_sql</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_count_by_sql(sql)
connection.select_value(sanitize_sql(sql), "#{name} Count", async: true).then(&:to_i)
end

@ -166,7 +166,7 @@ def first_or_initialize(attributes = nil, &block) # :nodoc:
# assume it encountered a race condition and will try finding the record
# once more If somehow the second find still find no record because a
# concurrent DELETE happened, it will then raise an
# <tt>ActiveRecord::RecordNotFound</tt> exception.
# ActiveRecord::RecordNotFound exception.
#
# Please note <b>this method is not atomic</b>, it runs first a SELECT,
# and if there are no results an INSERT is attempted. So if the table
@ -196,7 +196,7 @@ def find_or_create_by!(attributes, &block)
# * The underlying table must have the relevant columns defined with unique database constraints.
# * A unique constraint violation may be triggered by only one, or at least less than all,
# of the given attributes. This means that the subsequent #find_by! may fail to find a
# matching record, which will then raise an <tt>ActiveRecord::RecordNotFound</tt> exception,
# matching record, which will then raise an ActiveRecord::RecordNotFound exception,
# rather than a record with the given attributes.
# * While we avoid the race condition between SELECT -> INSERT from #find_or_create_by,
# we actually have another race condition between INSERT -> SELECT, which can be triggered

@ -93,7 +93,7 @@ def count(column_name = nil)
end
end
# Same as <tt>#count</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#count</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_count(column_name = nil)
async.count(column_name)
end
@ -106,7 +106,7 @@ def average(column_name)
calculate(:average, column_name)
end
# Same as <tt>#average</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#average</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_average(column_name)
async.average(column_name)
end
@ -120,7 +120,7 @@ def minimum(column_name)
calculate(:minimum, column_name)
end
# Same as <tt>#minimum</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#minimum</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_minimum(column_name)
async.minimum(column_name)
end
@ -134,7 +134,7 @@ def maximum(column_name)
calculate(:maximum, column_name)
end
# Same as <tt>#maximum</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#maximum</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_maximum(column_name)
async.maximum(column_name)
end
@ -152,7 +152,7 @@ def sum(initial_value_or_column = 0, &block)
end
end
# Same as <tt>#sum</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#sum</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_sum(identity_or_column = nil)
async.sum(identity_or_column)
end
@ -287,7 +287,7 @@ def pluck(*column_names)
end
end
# Same as <tt>#pluck</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#pluck</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_pluck(*column_names)
async.pluck(*column_names)
end
@ -315,7 +315,7 @@ def pick(*column_names)
limit(1).pluck(*column_names).then(&:first)
end
# Same as <tt>#pick</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#pick</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_pick(*column_names)
async.pick(*column_names)
end
@ -352,7 +352,7 @@ def ids
result.then { |result| type_cast_pluck_values(result, columns) }
end
# Same as <tt>#ids</tt> but perform the query asynchronously and returns an <tt>ActiveRecord::Promise</tt>
# Same as <tt>#ids</tt> but perform the query asynchronously and returns an ActiveRecord::Promise
def async_ids
async.ids
end

@ -24,7 +24,7 @@ module ClassMethods
# user.regenerate_token # => true
# user.regenerate_auth_token # => true
#
# <tt>SecureRandom::base58</tt> is used to generate at minimum a 24-character unique token, so collisions are highly unlikely.
# +SecureRandom::base58+ is used to generate at minimum a 24-character unique token, so collisions are highly unlikely.
#
# Note that it's still possible to generate a race condition in the database in the same way that
# {validates_uniqueness_of}[rdoc-ref:Validations::ClassMethods#validates_uniqueness_of] can.

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActiveRecord
# Returns the currently loaded version of Active Record as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Active Record as a +Gem::Version+.
def self.version
gem_version
end

@ -29,7 +29,7 @@ class ActiveStorage::Attachment < ActiveStorage::Record
##
# :method:
#
# Returns the associated <tt>ActiveStorage::Blob</tt>.
# Returns the associated ActiveStorage::Blob.
belongs_to :blob, class_name: "ActiveStorage::Blob", autosave: true
delegate_missing_to :blob

@ -34,7 +34,7 @@ class ActiveStorage::Blob < ActiveStorage::Record
##
# :method:
#
# Returns the associated <tt>ActiveStorage::Attachment</tt>s.
# Returns the associated +ActiveStorage::Attachment+s.
has_many :attachments
##

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActiveStorage
# Returns the currently loaded version of Active Storage as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Active Storage as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActiveStorage
# Returns the currently loaded version of Active Storage as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Active Storage as a +Gem::Version+.
def self.version
gem_version
end

@ -5,7 +5,7 @@ module ActiveSupport
#
# Actionable errors lets you define actions to resolve an error.
#
# To make an error actionable, include the <tt>ActiveSupport::ActionableError</tt>
# To make an error actionable, include the +ActiveSupport::ActionableError+
# module and invoke the +action+ class macro to define the action. An action
# needs a name and a block to execute.
module ActionableError

@ -18,7 +18,7 @@ module ActiveSupport
# end
# end
#
# By using <tt>ActiveSupport::Concern</tt> the above module could instead be
# By using +ActiveSupport::Concern+ the above module could instead be
# written as:
#
# require "active_support/concern"
@ -75,7 +75,7 @@ module ActiveSupport
# end
#
# Unfortunately this won't work, since when +Foo+ is included, its <tt>base</tt>
# is the +Bar+ module, not the +Host+ class. With <tt>ActiveSupport::Concern</tt>,
# is the +Bar+ module, not the +Host+ class. With +ActiveSupport::Concern+,
# module dependencies are properly resolved:
#
# require "active_support/concern"

@ -68,7 +68,7 @@ class Hash
#
# By default the root node is "hash", but that's configurable via the <tt>:root</tt> option.
#
# The default XML builder is a fresh instance of <tt>Builder::XmlMarkup</tt>. You can
# The default XML builder is a fresh instance of +Builder::XmlMarkup+. You can
# configure your own builder with the <tt>:builder</tt> option. The method also accepts
# options like <tt>:dasherize</tt> and friends, they are forwarded to the builder.
def to_xml(options = {})

@ -21,8 +21,8 @@ def zone
#
# * A Rails TimeZone object.
# * An identifier for a Rails TimeZone object (e.g., "Eastern Time (US & Canada)", <tt>-5.hours</tt>).
# * A <tt>TZInfo::Timezone</tt> object.
# * An identifier for a <tt>TZInfo::Timezone</tt> object (e.g., "America/New_York").
# * A +TZInfo::Timezone+ object.
# * An identifier for a +TZInfo::Timezone+ object (e.g., "America/New_York").
#
# Here's an example of how you might set <tt>Time.zone</tt> on a per request basis and reset it when the request is done.
# <tt>current_user.time_zone</tt> just needs to return a string identifying the user's preferred time zone:

@ -51,7 +51,7 @@ class Deprecation
# You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+
# constant. Available behaviors are:
#
# [+raise+] Raise <tt>ActiveSupport::DeprecationException</tt>.
# [+raise+] Raise ActiveSupport::DeprecationException.
# [+stderr+] Log all deprecation warnings to <tt>$stderr</tt>.
# [+log+] Log all deprecation warnings to +Rails.logger+.
# [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+.
@ -78,7 +78,7 @@ def disallowed_behavior
#
# Available behaviors:
#
# [+raise+] Raise <tt>ActiveSupport::DeprecationException</tt>.
# [+raise+] Raise ActiveSupport::DeprecationException.
# [+stderr+] Log all deprecation warnings to <tt>$stderr</tt>.
# [+log+] Log all deprecation warnings to +Rails.logger+.
# [+notify+] Use +ActiveSupport::Notifications+ to notify +deprecation.rails+.

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActiveSupport
# Returns the currently loaded version of Active Support as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Active Support as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -115,7 +115,7 @@ def []=(key, value)
# hash.update({ "a" => 1 }, { "b" => 2 }) # => { "a" => 1, "b" => 2 }
#
# The arguments can be either an
# <tt>ActiveSupport::HashWithIndifferentAccess</tt> or a regular +Hash+.
# +ActiveSupport::HashWithIndifferentAccess+ or a regular +Hash+.
# In either case the merge respects the semantics of indifferent access.
#
# If the argument is a regular hash with keys +:key+ and <tt>"key"</tt> only one

@ -5,9 +5,9 @@ module ActiveSupport
#
# LazyLoadHooks allows Rails to lazily load a lot of components and thus
# making the app boot faster. Because of this feature now there is no need to
# require <tt>ActiveRecord::Base</tt> at boot time purely to apply
# require +ActiveRecord::Base+ at boot time purely to apply
# configuration. Instead a hook is registered that applies configuration once
# <tt>ActiveRecord::Base</tt> is loaded. Here <tt>ActiveRecord::Base</tt> is
# +ActiveRecord::Base+ is loaded. Here +ActiveRecord::Base+ is
# used as example but this feature can be applied elsewhere too.
#
# Here is an example where on_load method is called to register a hook.

@ -8,7 +8,7 @@
module ActiveSupport
# = Active Support Log \Subscriber
#
# <tt>ActiveSupport::LogSubscriber</tt> is an object set to consume
# +ActiveSupport::LogSubscriber+ is an object set to consume
# ActiveSupport::Notifications with the sole purpose of logging them.
# The log subscriber dispatches notifications to a registered object based
# on its given namespace.
@ -34,7 +34,7 @@ module ActiveSupport
# (ActiveSupport::Notifications::Event) to the +sql+ method.
#
# Being an ActiveSupport::Notifications consumer,
# <tt>ActiveSupport::LogSubscriber</tt> exposes a simple interface to check if
# +ActiveSupport::LogSubscriber+ exposes a simple interface to check if
# instrumented code raises an exception. It is common to log a different
# message in case of an error, and this can be achieved by extending
# the previous example:
@ -56,7 +56,7 @@ module ActiveSupport
# end
# end
#
# <tt>ActiveSupport::LogSubscriber</tt> also has some helpers to deal with
# +ActiveSupport::LogSubscriber+ also has some helpers to deal with
# logging. For example, ActiveSupport::LogSubscriber.flush_all! will ensure
# that all logs are flushed, and it is called in Rails::Rack::Logger after a
# request finishes.

@ -6,7 +6,7 @@
module ActiveSupport
# = \Notifications
#
# <tt>ActiveSupport::Notifications</tt> provides an instrumentation API for
# +ActiveSupport::Notifications+ provides an instrumentation API for
# Ruby.
#
# == Instrumenters

@ -7,7 +7,7 @@
end
module ActiveSupport
# DEPRECATED: <tt>ActiveSupport::OrderedHash</tt> implements a hash that preserves
# DEPRECATED: +ActiveSupport::OrderedHash+ implements a hash that preserves
# insertion order.
#
# oh = ActiveSupport::OrderedHash.new
@ -19,7 +19,7 @@ module ActiveSupport
# (See https://yaml.org/type/omap.html) to support ordered items
# when loading from YAML.
#
# <tt>ActiveSupport::OrderedHash</tt> is namespaced to prevent conflicts
# +ActiveSupport::OrderedHash+ is namespaced to prevent conflicts
# with other implementations.
class OrderedHash < ::Hash # :nodoc:
def to_yaml_type

@ -5,7 +5,7 @@
module ActiveSupport
# = Active Support \Subscriber
#
# <tt>ActiveSupport::Subscriber</tt> is an object set to consume
# +ActiveSupport::Subscriber+ is an object set to consume
# ActiveSupport::Notifications. The subscriber dispatches notifications to
# a registered object based on its given namespace.
#

@ -68,7 +68,7 @@ def utc
alias_method :getutc, :utc
alias_method :gmtime, :utc
# Returns the underlying <tt>TZInfo::TimezonePeriod</tt>.
# Returns the underlying +TZInfo::TimezonePeriod+.
def period
@period ||= time_zone.period_for_utc(@utc)
end
@ -208,7 +208,7 @@ def to_s
# Accepts an optional <tt>format</tt>:
# * <tt>:default</tt> - default value, mimics Ruby Time#to_s format.
# * <tt>:db</tt> - format outputs time in UTC :db time. See Time#to_fs(:db).
# * Any key in <tt>Time::DATE_FORMATS</tt> can be used. See active_support/core_ext/time/conversions.rb.
# * Any key in +Time::DATE_FORMATS+ can be used. See active_support/core_ext/time/conversions.rb.
def to_fs(format = :default)
if format == :db
utc.to_fs(format)

@ -6,14 +6,14 @@
module ActiveSupport
# = Active Support \Time Zone
#
# The TimeZone class serves as a wrapper around <tt>TZInfo::Timezone</tt> instances.
# The TimeZone class serves as a wrapper around +TZInfo::Timezone+ instances.
# It allows us to do the following:
#
# * Limit the set of zones provided by TZInfo to a meaningful subset of 134
# zones.
# * Retrieve and display zones with a friendlier name
# (e.g., "Eastern Time (US & Canada)" instead of "America/New_York").
# * Lazily load <tt>TZInfo::Timezone</tt> instances only when they're needed.
# * Lazily load +TZInfo::Timezone+ instances only when they're needed.
# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+,
# +parse+, +at+, and +now+ methods.
#
@ -545,13 +545,13 @@ def local_to_utc(time, dst = true)
tzinfo.local_to_utc(time, dst)
end
# Available so that TimeZone instances respond like <tt>TZInfo::Timezone</tt>
# Available so that TimeZone instances respond like +TZInfo::Timezone+
# instances.
def period_for_utc(time)
tzinfo.period_for_utc(time)
end
# Available so that TimeZone instances respond like <tt>TZInfo::Timezone</tt>
# Available so that TimeZone instances respond like +TZInfo::Timezone+
# instances.
def period_for_local(time, dst = true)
tzinfo.period_for_local(time, dst) { |periods| periods.last }

@ -3,7 +3,7 @@
require_relative "gem_version"
module ActiveSupport
# Returns the currently loaded version of Active Support as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Active Support as a +Gem::Version+.
def self.version
gem_version
end

@ -17,7 +17,7 @@ module Configuration
#
# config.middleware.use Magical::Unicorns
#
# This will put the <tt>Magical::Unicorns</tt> middleware on the end of the stack.
# This will put the +Magical::Unicorns+ middleware on the end of the stack.
# You can use +insert_before+ if you wish to add a middleware before another:
#
# config.middleware.insert_before Rack::Head, Magical::Unicorns
@ -34,8 +34,8 @@ module Configuration
#
# config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns
#
# This will move the <tt>Magical::Unicorns</tt> middleware before the
# <tt>ActionDispatch::Flash</tt>. You can also move it after:
# This will move the +Magical::Unicorns+ middleware before the
# +ActionDispatch::Flash+. You can also move it after:
#
# config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns
#

@ -9,12 +9,12 @@
require "thread"
module Rails
# <tt>Rails::Engine</tt> allows you to wrap a specific Rails application or subset of
# +Rails::Engine+ allows you to wrap a specific Rails application or subset of
# functionality and share it with other applications or within a larger packaged application.
# Every Rails::Application is just an engine, which allows for simple
# feature and application sharing.
#
# Any <tt>Rails::Engine</tt> is also a Rails::Railtie, so the same
# Any +Rails::Engine+ is also a Rails::Railtie, so the same
# methods (like <tt>rake_tasks</tt> and +generators+) and configuration
# options that are available in railties can also be used in engines.
#
@ -181,7 +181,7 @@ module Rails
# it's used as default <tt>:as</tt> option
# * rake task for installing migrations <tt>my_engine:install:migrations</tt>
#
# Engine name is set by default based on class name. For <tt>MyEngine::Engine</tt> it will be
# Engine name is set by default based on class name. For +MyEngine::Engine+ it will be
# <tt>my_engine_engine</tt>. You can change it manually using the <tt>engine_name</tt> method:
#
# module MyEngine
@ -231,14 +231,14 @@ module Rails
# end
#
# If +MyEngine+ is isolated, the routes above will point to
# <tt>MyEngine::ArticlesController</tt>. You also don't need to use longer
# +MyEngine::ArticlesController+. You also don't need to use longer
# URL helpers like +my_engine_articles_path+. Instead, you should simply use
# +articles_path+, like you would do with your main application.
#
# To make this behavior consistent with other parts of the framework,
# isolated engines also have an effect on ActiveModel::Naming. In a
# normal Rails app, when you use a namespaced model such as
# <tt>Namespace::Article</tt>, ActiveModel::Naming will generate
# +Namespace::Article+, ActiveModel::Naming will generate
# names with the prefix "namespace". In an isolated engine, the prefix will
# be omitted in URL helpers and form fields, for convenience.
#
@ -252,7 +252,7 @@ module Rails
# Additionally, an isolated engine will set its own name according to its
# namespace, so <tt>MyEngine::Engine.engine_name</tt> will return
# "my_engine". It will also set +MyEngine.table_name_prefix+ to "my_engine_",
# meaning for example that <tt>MyEngine::Article</tt> will use the
# meaning for example that +MyEngine::Article+ will use the
# +my_engine_articles+ database table by default.
#
# == Using Engine's routes outside Engine

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Rails
# Returns the currently loaded version of Rails as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Rails as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end

@ -4,7 +4,7 @@
module Rails
module Paths
# This object is an extended hash that behaves as root of the <tt>Rails::Paths</tt> system.
# This object is an extended hash that behaves as root of the +Rails::Paths+ system.
# It allows you to collect information about how you want to structure your application
# paths through a Hash-like API. It requires you to give a physical path on initialization.
#

@ -7,7 +7,7 @@
require "active_support/core_ext/module/delegation"
module Rails
# <tt>Rails::Railtie</tt> is the core of the Rails framework and provides
# +Rails::Railtie+ is the core of the Rails framework and provides
# several hooks to extend Rails and/or modify the initialization process.
#
# Every major component of Rails (Action Mailer, Action Controller, Active
@ -29,9 +29,9 @@ module Rails
#
# == Creating a Railtie
#
# To extend Rails using a railtie, create a subclass of <tt>Rails::Railtie</tt>.
# To extend Rails using a railtie, create a subclass of +Rails::Railtie+.
# This class must be loaded during the Rails boot process, and is conventionally
# called <tt>MyNamespace::Railtie</tt>.
# called +MyNamespace::Railtie+.
#
# The following example demonstrates an extension which can be used with or
# without Rails.

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Rails
# Returns the currently loaded version of Rails as a <tt>Gem::Version</tt>.
# Returns the currently loaded version of Rails as a +Gem::Version+.
def self.gem_version
Gem::Version.new VERSION::STRING
end