diff --git a/actioncable/lib/action_cable/connection/test_case.rb b/actioncable/lib/action_cable/connection/test_case.rb
index d8907dd255c..6fd9c20ddb1 100644
--- a/actioncable/lib/action_cable/connection/test_case.rb
+++ b/actioncable/lib/action_cable/connection/test_case.rb
@@ -86,7 +86,7 @@ module ActionCable
# end
#
# +connect+ accepts additional information about the HTTP request with the
- # +params+, +headers+, +session+ and Rack +env+ options.
+ # +params+, +headers+, +session+, and Rack +env+ options.
#
# def test_connect_with_headers_and_query_string
# connect params: { user_id: 1 }, headers: { "X-API-TOKEN" => "secret-my" }
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index d90b7dbb5cf..a0b3f355fd4 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -106,7 +106,7 @@ module ActionMailer
# You got a new note!
# <%= truncate(@note.body, length: 25) %>
#
- # If you need to access the subject, from or the recipients in the view, you can do that through message object:
+ # If you need to access the subject, from, or the recipients in the view, you can do that through message object:
#
# You got a new note from <%= message.from %>!
# <%= truncate(@note.body, length: 25) %>
@@ -493,28 +493,28 @@ module ActionMailer
end
# Register an Observer which will be notified when mail is delivered.
- # Either a class, string or symbol can be passed in as the Observer.
+ # Either a class, string, or symbol can be passed in as the Observer.
# If a string or symbol is passed in it will be camelized and constantized.
def register_observer(observer)
Mail.register_observer(observer_class_for(observer))
end
# Unregister a previously registered Observer.
- # Either a class, string or symbol can be passed in as the Observer.
+ # Either a class, string, or symbol can be passed in as the Observer.
# If a string or symbol is passed in it will be camelized and constantized.
def unregister_observer(observer)
Mail.unregister_observer(observer_class_for(observer))
end
# Register an Interceptor which will be called before mail is sent.
- # Either a class, string or symbol can be passed in as the Interceptor.
+ # Either a class, string, or symbol can be passed in as the Interceptor.
# If a string or symbol is passed in it will be camelized and constantized.
def register_interceptor(interceptor)
Mail.register_interceptor(observer_class_for(interceptor))
end
# Unregister a previously registered Interceptor.
- # Either a class, string or symbol can be passed in as the Interceptor.
+ # Either a class, string, or symbol can be passed in as the Interceptor.
# If a string or symbol is passed in it will be camelized and constantized.
def unregister_interceptor(interceptor)
Mail.unregister_interceptor(observer_class_for(interceptor))
diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb
index 459313444d0..c1d3f161dfb 100644
--- a/actionpack/lib/action_controller/metal/http_authentication.rb
+++ b/actionpack/lib/action_controller/metal/http_authentication.rb
@@ -5,7 +5,7 @@ require "active_support/security_utils"
require "active_support/core_ext/array/access"
module ActionController
- # HTTP Basic, Digest and Token authentication.
+ # HTTP Basic, Digest, and Token authentication.
module HttpAuthentication
# HTTP \Basic authentication.
#
@@ -301,7 +301,7 @@ module ActionController
#
# An implementation might choose not to accept a previously used nonce or a previously used digest, in order to
# protect against a replay attack. Or, an implementation might choose to use one-time nonces or digests for
- # POST, PUT, or PATCH requests and a time-stamp for GET requests. For more details on the issues involved see Section 4
+ # POST, PUT, or PATCH requests, and a time-stamp for GET requests. For more details on the issues involved see Section 4
# of this document.
#
# The nonce is opaque to the client. Composed of Time, and hash of Time with secret
diff --git a/actionpack/lib/action_controller/metal/streaming.rb b/actionpack/lib/action_controller/metal/streaming.rb
index a34f298d4de..a45a12043ae 100644
--- a/actionpack/lib/action_controller/metal/streaming.rb
+++ b/actionpack/lib/action_controller/metal/streaming.rb
@@ -72,7 +72,7 @@ module ActionController # :nodoc:
# variables set in the template to be used in the layout, they won't
# work once you move to streaming. The proper way to communicate
# between layout and template, regardless of whether you use streaming
- # or not, is by using +content_for+, +provide+ and +yield+.
+ # or not, is by using +content_for+, +provide+, and +yield+.
#
# Take a simple example where the layout expects the template to tell
# which title to use:
@@ -132,7 +132,7 @@ module ActionController # :nodoc:
# That said, when streaming, you need to properly check your templates
# and choose when to use +provide+ and +content_for+.
#
- # == Headers, cookies, session and flash
+ # == Headers, cookies, session, and flash
#
# When streaming, the HTTP headers are sent to the client right before
# it renders the first line. This means that, modifying headers, cookies,
diff --git a/actionpack/lib/action_controller/metal/url_for.rb b/actionpack/lib/action_controller/metal/url_for.rb
index f077e765ab9..78187b833b0 100644
--- a/actionpack/lib/action_controller/metal/url_for.rb
+++ b/actionpack/lib/action_controller/metal/url_for.rb
@@ -8,7 +8,7 @@ module ActionController
# URL options like the +host+. In order to do so, this module requires the host class
# to implement +env+ which needs to be Rack-compatible and +request+
# which is either an instance of +ActionDispatch::Request+ or an object
- # that responds to the +host+, +optional_port+, +protocol+ and
+ # that responds to the +host+, +optional_port+, +protocol+, and
# +symbolized_path_parameter+ methods.
#
# class RootUrl
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 61ca96a480c..e1f0ac788a3 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -241,7 +241,7 @@ module ActionController
# == Basic example
#
# Functional tests are written as follows:
- # 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+ or +head+ method to simulate
+ # 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+, or +head+ method to simulate
# an HTTP request.
# 2. Then, one asserts whether the current state is as expected. "State" can be anything:
# the controller's HTTP response, the database contents, etc.
@@ -391,7 +391,7 @@ module ActionController
#
# You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with
# +post+, +patch+, +put+, +delete+, and +head+.
- # Example sending parameters, session and setting a flash message:
+ # Example sending parameters, session, and setting a flash message:
#
# get :show,
# params: { id: 7 },
@@ -461,7 +461,7 @@ module ActionController
# session: { user_id: 1 },
# flash: { notice: 'This is flash message' }
#
- # To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+ and +HEAD+ requests
+ # To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, and +HEAD+ requests
# prefer using #get, #post, #patch, #put, #delete and #head methods
# respectively which will make tests more expressive.
#
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb
index 623250c0750..271729a6d20 100644
--- a/actionpack/lib/action_dispatch/http/request.rb
+++ b/actionpack/lib/action_dispatch/http/request.rb
@@ -298,7 +298,7 @@ module ActionDispatch
ACTION_DISPATCH_REQUEST_ID = "action_dispatch.request_id" # :nodoc:
# Returns the unique request id, which is based on either the X-Request-Id header that can
- # be generated by a firewall, load balancer, or web server or by the RequestId middleware
+ # be generated by a firewall, load balancer, or web server, or by the RequestId middleware
# (which sets the action_dispatch.request_id environment variable).
#
# This unique ID is useful for tracing a request from end-to-end as part of logging or debugging.
diff --git a/actionpack/lib/action_dispatch/routing.rb b/actionpack/lib/action_dispatch/routing.rb
index 54e919369a0..c9bf3e2d827 100644
--- a/actionpack/lib/action_dispatch/routing.rb
+++ b/actionpack/lib/action_dispatch/routing.rb
@@ -28,7 +28,7 @@ module ActionDispatch
#
# Resource routing allows you to quickly declare all of the common routes
# for a given resourceful controller. Instead of declaring separate routes
- # for your +index+, +show+, +new+, +edit+, +create+, +update+ and +destroy+
+ # for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+
# actions, a resourceful route declares them in a single line of code:
#
# resources :photos
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 58d343eda59..78949660030 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -390,10 +390,10 @@ module ActionDispatch
#
# If you want to expose your action to both GET and POST, use:
#
- # # sets :controller, :action and :id in params
+ # # sets :controller, :action, and :id in params
# match ':controller/:action/:id', via: [:get, :post]
#
- # Note that +:controller+, +:action+ and +:id+ are interpreted as URL
+ # Note that +:controller+, +:action+, and +:id+ are interpreted as URL
# query parameters and thus available through +params+ in an action.
#
# If you want to expose your action to GET, use +get+ in the router:
@@ -906,7 +906,7 @@ module ActionDispatch
#
# === Options
#
- # The +:path+, +:as+, +:module+, +:shallow_path+ and +:shallow_prefix+
+ # The +:path+, +:as+, +:module+, +:shallow_path+, and +:shallow_prefix+
# options all default to the name of the namespace.
#
# For options, see Base#match. For +:shallow_path+ option, see
@@ -1082,7 +1082,7 @@ module ActionDispatch
# Resource routing allows you to quickly declare all of the common routes
# for a given resourceful controller. Instead of declaring separate routes
- # for your +index+, +show+, +new+, +edit+, +create+, +update+ and +destroy+
+ # for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+
# actions, a resourceful route declares them in a single line of code:
#
# resources :photos
diff --git a/actionpack/lib/action_dispatch/routing/url_for.rb b/actionpack/lib/action_dispatch/routing/url_for.rb
index b4de37d7a1a..309b9207ea6 100644
--- a/actionpack/lib/action_dispatch/routing/url_for.rb
+++ b/actionpack/lib/action_dispatch/routing/url_for.rb
@@ -70,7 +70,7 @@ module ActionDispatch
# resources :users
#
# This generates, among other things, the method users_path. By default,
- # this method is accessible from your controllers, views and mailers. If you need
+ # this method is accessible from your controllers, views, and mailers. If you need
# to access this auto-generated method from other places (such as a model), then
# you can do that by including Rails.application.routes.url_helpers in your class:
#
@@ -115,7 +115,7 @@ module ActionDispatch
default_url_options
end
- # Generate a URL based on the options provided, default_url_options and the
+ # Generate a URL based on the options provided, default_url_options, and the
# routes defined in routes.rb. The following options are supported:
#
# * :only_path - If true, the relative URL is returned. Defaults to +false+.
@@ -154,7 +154,7 @@ module ActionDispatch
# # => '/myapp/tasks/testing'
#
# Missing routes keys may be filled in from the current request's parameters
- # (e.g. +:controller+, +:action+, +:id+ and any other parameters that are
+ # (e.g. +:controller+, +:action+, +:id+, and any other parameters that are
# placed in the path). Given that the current action has been reached
# through GET /users/1:
#
diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb
index 849999e28b3..227d567ff64 100644
--- a/actionview/lib/action_view/helpers/date_helper.rb
+++ b/actionview/lib/action_view/helpers/date_helper.rb
@@ -26,7 +26,7 @@ module ActionView
MINUTES_IN_QUARTER_YEAR = 131400
MINUTES_IN_THREE_QUARTERS_YEAR = 394200
- # Reports the approximate distance in time between two Time, Date or DateTime objects or integers as seconds.
+ # Reports the approximate distance in time between two Time, Date, or DateTime objects or integers as seconds.
# Pass include_seconds: true if you want more detailed approximations when distance < 1 min, 29 secs.
# Distances are reported based on the following table:
#
@@ -291,12 +291,12 @@ module ActionView
Tags::DateSelect.new(object_name, method, self, options, html_options).render
end
- # Returns a set of select tags (one for hour, minute and optionally second) pre-selected for accessing a
+ # Returns a set of select tags (one for hour, minute, and optionally second) pre-selected for accessing a
# specified time-based attribute (identified by +method+) on an object assigned to the template (identified by
# +object+). You can include the seconds with :include_seconds. You can get hours in the AM/PM format
# with :ampm option.
#
- # This method will also generate 3 input hidden tags, for the actual year, month and day unless the option
+ # This method will also generate 3 input hidden tags, for the actual year, month, and day unless the option
# :ignore_date is set to +true+. If you set the :ignore_date to +true+, you must have a
# +date_select+ on the same method within the form otherwise an exception will be raised.
#
diff --git a/actionview/lib/action_view/helpers/number_helper.rb b/actionview/lib/action_view/helpers/number_helper.rb
index 32d9f22c906..a0e9294ae2a 100644
--- a/actionview/lib/action_view/helpers/number_helper.rb
+++ b/actionview/lib/action_view/helpers/number_helper.rb
@@ -9,7 +9,7 @@ module ActionView
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.
+ # precision, positional notation, file size, and pretty printing.
#
# Most methods expect a +number+ argument, and will return it
# unchanged if can't be converted into a valid number.
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb
index ffd399929ee..33d633c43aa 100644
--- a/actionview/lib/action_view/helpers/tag_helper.rb
+++ b/actionview/lib/action_view/helpers/tag_helper.rb
@@ -208,7 +208,7 @@ module ActionView
#
# Thus data-user-id can be accessed as dataset.userId.
#
- # Data attribute values are encoded to JSON, with the exception of strings, symbols and
+ # Data attribute values are encoded to JSON, with the exception of strings, symbols, and
# BigDecimals.
# This may come in handy when using jQuery's HTML5-aware .data()
# from 1.4.3.
diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb
index dc90930b56f..d1bc7797526 100644
--- a/actionview/lib/action_view/layouts.rb
+++ b/actionview/lib/action_view/layouts.rb
@@ -255,7 +255,7 @@ module ActionView
# true:: raise an ArgumentError
# nil:: Force default layout behavior with inheritance
#
- # Return value of +Proc+ and +Symbol+ arguments should be +String+, +false+, +true+ or +nil+
+ # Return value of +Proc+ and +Symbol+ arguments should be +String+, +false+, +true+, or +nil+
# with the same meaning as described above.
#
# ==== Parameters
diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb
index 2fc3a510264..b9b7fcb32a1 100644
--- a/activejob/lib/active_job/arguments.rb
+++ b/activejob/lib/active_job/arguments.rb
@@ -18,7 +18,7 @@ module ActiveJob
# currently support String, Integer, Float, NilClass, TrueClass, FalseClass,
# BigDecimal, Symbol, Date, Time, DateTime, ActiveSupport::TimeWithZone,
# ActiveSupport::Duration, Hash, ActiveSupport::HashWithIndifferentAccess,
- # Array, Range or GlobalID::Identification instances, although this can be
+ # Array, Range, or GlobalID::Identification instances, although this can be
# extended by adding custom serializers.
# Raised if you set the key for a Hash something else than a string or
# a symbol. Also raised when trying to serialize an object which can't be
diff --git a/activejob/lib/active_job/enqueuing.rb b/activejob/lib/active_job/enqueuing.rb
index 97b97104706..62fb57ea090 100644
--- a/activejob/lib/active_job/enqueuing.rb
+++ b/activejob/lib/active_job/enqueuing.rb
@@ -17,7 +17,7 @@ module ActiveJob
# Push a job onto the queue. By default the arguments must be either String,
# Integer, Float, NilClass, TrueClass, FalseClass, BigDecimal, Symbol, Date,
# Time, DateTime, ActiveSupport::TimeWithZone, ActiveSupport::Duration,
- # Hash, ActiveSupport::HashWithIndifferentAccess, Array, Range or
+ # Hash, ActiveSupport::HashWithIndifferentAccess, Array, Range, or
# GlobalID::Identification instances, although this can be extended by adding
# custom serializers.
#
diff --git a/activejob/lib/active_job/test_helper.rb b/activejob/lib/active_job/test_helper.rb
index 45f066f795b..c899627e724 100644
--- a/activejob/lib/active_job/test_helper.rb
+++ b/activejob/lib/active_job/test_helper.rb
@@ -109,7 +109,7 @@ module ActiveJob
# end
# end
#
- # +:only+ and +:except+ options accept Class, Array of Class or Proc. When passed a Proc,
+ # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc,
# a hash containing the job's class and it's argument are passed as argument.
#
# Asserts the number of times a job is enqueued to a specific queue by passing +:queue+ option.
@@ -168,7 +168,7 @@ module ActiveJob
# end
# end
#
- # +:only+ and +:except+ options accept Class, Array of Class or Proc. When passed a Proc,
+ # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc,
# a hash containing the job's class and it's argument are passed as argument.
#
# Asserts that no jobs are enqueued to a specific queue by passing +:queue+ option
@@ -325,7 +325,7 @@ module ActiveJob
# end
# end
#
- # +:only+ and +:except+ options accept Class, Array of Class or Proc. When passed a Proc,
+ # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc,
# an instance of the job will be passed as argument.
#
# If the +:queue+ option is specified,
@@ -579,7 +579,7 @@ module ActiveJob
# assert_performed_jobs 1
# end
#
- # +:only+ and +:except+ options accept Class, Array of Class or Proc. When passed a Proc,
+ # +:only+ and +:except+ options accept Class, Array of Class, or Proc. When passed a Proc,
# an instance of the job will be passed as argument.
#
# If the +:queue+ option is specified,
diff --git a/activemodel/lib/active_model/api.rb b/activemodel/lib/active_model/api.rb
index b058526f549..6cdcdacf445 100644
--- a/activemodel/lib/active_model/api.rb
+++ b/activemodel/lib/active_model/api.rb
@@ -5,7 +5,7 @@ module ActiveModel
#
# Includes the required interface for an object to interact with
# Action Pack and Action View, using different Active Model modules.
- # It includes model name introspections, conversions, translations and
+ # It includes model name introspections, conversions, translations, and
# validations. Besides that, it allows you to initialize the object with a
# hash of attributes, pretty much like Active Record does.
#
diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb
index 7d577a97898..0d8a2d497ef 100644
--- a/activemodel/lib/active_model/attribute_methods.rb
+++ b/activemodel/lib/active_model/attribute_methods.rb
@@ -253,7 +253,7 @@ module ActiveModel
# 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
+ # +define_attribute_methods+ after you define any prefix, suffix, or affix
# methods, or they will not hook in.
#
# class Person
diff --git a/activemodel/lib/active_model/callbacks.rb b/activemodel/lib/active_model/callbacks.rb
index 02b91bce88b..5faf953fa0e 100644
--- a/activemodel/lib/active_model/callbacks.rb
+++ b/activemodel/lib/active_model/callbacks.rb
@@ -32,7 +32,7 @@ module ActiveModel
# end
# end
#
- # Then in your class, you can use the +before_create+, +after_create+ and
+ # Then in your class, you can use the +before_create+, +after_create+, and
# +around_create+ methods, just as you would in an Active Record model.
#
# before_create :action_before_create
@@ -84,7 +84,7 @@ module ActiveModel
# define_model_callbacks :update, only: :before
# define_model_callbacks :destroy, only: :around
#
- # Would create +after_create+, +before_update+ and +around_destroy+ methods
+ # Would create +after_create+, +before_update+, and +around_destroy+ methods
# only.
#
# You can pass in a class to before_, after_ and around_,
diff --git a/activemodel/lib/active_model/error.rb b/activemodel/lib/active_model/error.rb
index 103d7d6e714..990beb5f554 100644
--- a/activemodel/lib/active_model/error.rb
+++ b/activemodel/lib/active_model/error.rb
@@ -159,7 +159,7 @@ module ActiveModel
self.class.full_message(attribute, message, @base)
end
- # See if error matches provided +attribute+, +type+ and +options+.
+ # See if error matches provided +attribute+, +type+, and +options+.
#
# Omitted params are not checked for a match.
def match?(attribute, type = nil, **options)
@@ -176,7 +176,7 @@ module ActiveModel
true
end
- # See if error matches provided +attribute+, +type+ and +options+ exactly.
+ # See if error matches provided +attribute+, +type+, and +options+ exactly.
#
# All params must be equal to Error's own attributes to be considered a
# strict match.
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index 5ec4581c2ed..c035b9c33f2 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -147,7 +147,7 @@ module ActiveModel
}
end
- # Search for errors matching +attribute+, +type+ or +options+.
+ # Search for errors matching +attribute+, +type+, or +options+.
#
# Only supplied params will be matched.
#
@@ -427,7 +427,7 @@ module ActiveModel
# if it's not there, it's looked up in activemodel.errors.models.MODEL.MESSAGE and if
# that is not there also, it returns the translation of the default message
# (e.g. activemodel.errors.messages.MESSAGE). The translated model
- # name, translated attribute name and the value are available for
+ # name, translated attribute name, and the value are available for
# interpolation.
#
# When using inheritance in your models, it will check all the inherited
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb
index c12bfb3eb9b..bddda63c531 100644
--- a/activemodel/lib/active_model/validations.rb
+++ b/activemodel/lib/active_model/validations.rb
@@ -73,14 +73,14 @@ module ActiveModel
# on: [:create, :custom_validation_context])
# * :allow_nil - Skip validation if attribute is +nil+.
# * :allow_blank - Skip validation if attribute is blank.
- # * :if - Specifies a method, proc or string to call to determine
+ # * :if - Specifies a method, proc, or string to call to determine
# if the validation should occur (e.g. if: :allow_validation,
# or if: Proc.new { |user| user.signup_step > 2 }). The method,
# proc or string should return or evaluate to a +true+ or +false+ value.
- # * :unless - Specifies a method, proc or string to call to
+ # * :unless - Specifies a method, proc, or string to call to
# determine if the validation should not occur (e.g. unless: :skip_validation,
# or unless: Proc.new { |user| user.signup_step <= 2 }). The
- # method, proc or string should return or evaluate to a +true+ or +false+
+ # method, proc, or string should return or evaluate to a +true+ or +false+
# value.
def validates_each(*attr_names, &block)
validates_with BlockValidator, _merge_attributes(attr_names), &block
@@ -137,14 +137,14 @@ module ActiveModel
# or an array of symbols. (e.g. on: :create or
# on: :custom_validation_context or
# on: [:create, :custom_validation_context])
- # * :if - Specifies a method, proc or string to call to determine
+ # * :if - Specifies a method, proc, or string to call to determine
# if the validation should occur (e.g. if: :allow_validation,
# or if: Proc.new { |user| user.signup_step > 2 }). The method,
# proc or string should return or evaluate to a +true+ or +false+ value.
- # * :unless - Specifies a method, proc or string to call to
+ # * :unless - Specifies a method, proc, or string to call to
# determine if the validation should not occur (e.g. unless: :skip_validation,
# or unless: Proc.new { |user| user.signup_step <= 2 }). The
- # method, proc or string should return or evaluate to a +true+ or +false+
+ # method, proc, or string should return or evaluate to a +true+ or +false+
# value.
#
# NOTE: Calling +validate+ multiple times on the same method will overwrite previous definitions.
diff --git a/activemodel/lib/active_model/validations/exclusion.rb b/activemodel/lib/active_model/validations/exclusion.rb
index bed4313251c..e6ca2a64ca3 100644
--- a/activemodel/lib/active_model/validations/exclusion.rb
+++ b/activemodel/lib/active_model/validations/exclusion.rb
@@ -29,8 +29,8 @@ module ActiveModel
#
# Configuration options:
# * :in - An enumerable object of items that the value shouldn't
- # be part of. This can be supplied as a proc, lambda or symbol which returns an
- # enumerable. If the enumerable is a numerical, time or datetime range the test
+ # be part of. This can be supplied as a proc, lambda, or symbol which returns an
+ # enumerable. If the enumerable is a numerical, time, or datetime range the test
# is performed with Range#cover?, otherwise with include?. When
# using a proc or lambda the instance under validation is passed as an argument.
# * :within - A synonym(or alias) for :in
diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb
index 2781e0170dc..90fdf7e771c 100644
--- a/activemodel/lib/active_model/validations/inclusion.rb
+++ b/activemodel/lib/active_model/validations/inclusion.rb
@@ -28,8 +28,8 @@ module ActiveModel
#
# Configuration options:
# * :in - An enumerable object of available items. This can be
- # supplied as a proc, lambda or symbol which returns an enumerable. If the
- # enumerable is a numerical, time or datetime range the test is performed
+ # supplied as a proc, lambda, or symbol which returns an enumerable. If the
+ # enumerable is a numerical, time, or datetime range the test is performed
# with Range#cover?, otherwise with include?. When using
# a proc or lambda the instance under validation is passed as an argument.
# * :within - A synonym(or alias) for :in
diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb
index 41fc8f14ba9..c915ab9ac89 100644
--- a/activemodel/lib/active_model/validations/length.rb
+++ b/activemodel/lib/active_model/validations/length.rb
@@ -117,7 +117,7 @@ module ActiveModel
# too_long/too_short/wrong_length message.
#
# There is also a list of default options supported by every validator:
- # +:if+, +:unless+, +:on+ and +:strict+.
+ # +:if+, +:unless+, +:on+, and +:strict+.
# See ActiveModel::Validations#validates for more information.
def validates_length_of(*attr_names)
validates_with LengthValidator, _merge_attributes(attr_names)
diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb
index 20a34c56ccf..b203264b333 100644
--- a/activemodel/lib/active_model/validations/validates.rb
+++ b/activemodel/lib/active_model/validations/validates.rb
@@ -78,14 +78,14 @@ module ActiveModel
# or an array of symbols. (e.g. on: :create or
# on: :custom_validation_context or
# on: [:create, :custom_validation_context])
- # * :if - Specifies a method, proc or string to call to determine
+ # * :if - Specifies a method, proc, or string to call to determine
# if the validation should occur (e.g. if: :allow_validation,
# or if: Proc.new { |user| user.signup_step > 2 }). The method,
# proc or string should return or evaluate to a +true+ or +false+ value.
- # * :unless - Specifies a method, proc or string to call to determine
+ # * :unless - Specifies a method, proc, or string to call to determine
# if the validation should not occur (e.g. unless: :skip_validation,
# or unless: Proc.new { |user| user.signup_step <= 2 }). The
- # method, proc or string should return or evaluate to a +true+ or
+ # method, proc, or string should return or evaluate to a +true+ or
# +false+ value.
# * :allow_nil - Skip validation if the attribute is +nil+.
# * :allow_blank - Skip validation if the attribute is blank.
diff --git a/activemodel/lib/active_model/validations/with.rb b/activemodel/lib/active_model/validations/with.rb
index d777ac836e7..cae87b4297a 100644
--- a/activemodel/lib/active_model/validations/with.rb
+++ b/activemodel/lib/active_model/validations/with.rb
@@ -51,16 +51,16 @@ module ActiveModel
# or an array of symbols. (e.g. on: :create or
# on: :custom_validation_context or
# on: [:create, :custom_validation_context])
- # * :if - Specifies a method, proc or string to call to determine
+ # * :if - Specifies a method, proc, or string to call to determine
# if the validation should occur (e.g. if: :allow_validation,
# or if: Proc.new { |user| user.signup_step > 2 }).
- # The method, proc or string should return or evaluate to a +true+ or
+ # The method, proc, or string should return or evaluate to a +true+ or
# +false+ value.
- # * :unless - Specifies a method, proc or string to call to
+ # * :unless - Specifies a method, proc, or string to call to
# determine if the validation should not occur
# (e.g. unless: :skip_validation, or
# unless: Proc.new { |user| user.signup_step <= 2 }).
- # The method, proc or string should return or evaluate to a +true+ or
+ # The method, proc, or string should return or evaluate to a +true+ or
# +false+ value.
# * :strict - Specifies whether validation should be strict.
# See ActiveModel::Validations#validates! for more information.
diff --git a/activemodel/lib/active_model/validator.rb b/activemodel/lib/active_model/validator.rb
index a97c2b7fabd..7c949e11b6a 100644
--- a/activemodel/lib/active_model/validator.rb
+++ b/activemodel/lib/active_model/validator.rb
@@ -126,7 +126,7 @@ module ActiveModel
# +EachValidator+ is a validator which iterates through the attributes given
# in the options hash invoking the validate_each method passing in the
- # record, attribute and value.
+ # record, attribute, and value.
#
# All \Active \Model validations are built on top of this validator.
class EachValidator < Validator
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 8629cc45be4..069184ece8a 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -432,7 +432,7 @@ module ActiveRecord
#
# == Cardinality and associations
#
- # Active Record associations can be used to describe one-to-one, one-to-many and many-to-many
+ # Active Record associations can be used to describe one-to-one, one-to-many, and many-to-many
# relationships between models. Each model uses an association to describe its role in
# the relation. The #belongs_to association is always used in the model that has
# the foreign key.
@@ -586,7 +586,7 @@ module ActiveRecord
# has_many :birthday_events, ->(user) { where(starts_on: user.birthday) }, class_name: 'Event'
# end
#
- # Note: Joining, eager loading and preloading of these associations is not possible.
+ # Note: Joining, eager loading, and preloading of these associations is not possible.
# These operations happen before instance creation and the scope will be called with a +nil+ argument.
#
# == Association callbacks
@@ -618,7 +618,7 @@ module ActiveRecord
# after_remove: :log_after_remove
# end
#
- # Possible callbacks are: +before_add+, +after_add+, +before_remove+ and +after_remove+.
+ # Possible callbacks are: +before_add+, +after_add+, +before_remove+, and +after_remove+.
#
# If any of the +before_add+ callbacks throw an exception, the object will not be
# added to the collection.
@@ -1333,7 +1333,7 @@ module ActiveRecord
# === Extensions
#
# The +extension+ argument allows you to pass a block into a has_many
- # association. This is useful for adding new finders, creators and other
+ # association. This is useful for adding new finders, creators, and other
# factory-type methods to be used as part of the association.
#
# Extension examples:
@@ -1905,7 +1905,7 @@ module ActiveRecord
#
# The +extension+ argument allows you to pass a block into a
# has_and_belongs_to_many association. This is useful for adding new
- # finders, creators and other factory-type methods to be used as part of
+ # finders, creators, and other factory-type methods to be used as part of
# the association.
#
# Extension examples:
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb
index aec13db4863..254fd0a0aef 100644
--- a/activerecord/lib/active_record/associations/collection_proxy.rb
+++ b/activerecord/lib/active_record/associations/collection_proxy.rb
@@ -475,7 +475,7 @@ module ActiveRecord
# Deletes the records of the collection directly from the database
# ignoring the +:dependent+ option. Records are instantiated and it
- # invokes +before_remove+, +after_remove+, +before_destroy+ and
+ # invokes +before_remove+, +after_remove+, +before_destroy+, and
# +after_destroy+ callbacks.
#
# class Person < ActiveRecord::Base
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb
index c8ed812e447..e36743f5710 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_handler.rb
@@ -40,7 +40,7 @@ module ActiveRecord
# but the Book model connects to a separate database called "library_db"
# (this can even be a database on a different machine).
#
- # Book, ScaryBook and GoodBook will all use the same connection pool to
+ # Book, ScaryBook, and GoodBook will all use the same connection pool to
# "library_db" while Author, BankAccount, and any other models you create
# will use the default connection pool to "my_application".
#
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index bbf39f91301..c81d34b5141 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -1073,9 +1073,9 @@ module ActiveRecord
# [:name]
# The constraint name. Defaults to fk_rails_.
# [:on_delete]
- # Action that happens ON DELETE. Valid values are +:nullify+, +:cascade+ and +:restrict+
+ # Action that happens ON DELETE. Valid values are +:nullify+, +:cascade+, and +:restrict+
# [:on_update]
- # Action that happens ON UPDATE. Valid values are +:nullify+, +:cascade+ and +:restrict+
+ # Action that happens ON UPDATE. Valid values are +:nullify+, +:cascade+, and +:restrict+
# [:if_not_exists]
# Specifies if the foreign key already exists to not try to re-add it. This will avoid
# duplicate column errors.
diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb
index 54c3ee4c1b0..0af881cbcf4 100644
--- a/activerecord/lib/active_record/connection_handling.rb
+++ b/activerecord/lib/active_record/connection_handling.rb
@@ -44,7 +44,7 @@ module ActiveRecord
#
# ActiveRecord::Base.establish_connection(:production)
#
- # The exceptions AdapterNotSpecified, AdapterNotFound and +ArgumentError+
+ # The exceptions AdapterNotSpecified, AdapterNotFound, and +ArgumentError+
# may be returned on an error.
def establish_connection(config_or_env = nil)
config_or_env ||= DEFAULT_ENV.call.to_sym
@@ -108,7 +108,7 @@ module ActiveRecord
connections
end
- # Connects to a role (e.g. writing, reading or a custom role) and/or
+ # Connects to a role (e.g. writing, reading, or a custom role) and/or
# shard for the duration of the block. At the end of the block the
# connection will be returned to the original role / shard.
#
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index d0208fa3f7f..9770986eacc 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -326,7 +326,7 @@ module ActiveRecord
# details.
# * change_table(name, options): Allows to make column alterations to
# the table called +name+. It makes the table object available to a block that
- # can then add/remove columns, indexes or foreign keys to it.
+ # can then add/remove columns, indexes, or foreign keys to it.
# * rename_column(table_name, column_name, new_column_name): Renames
# a column but keeps the type and content.
# * rename_index(table_name, old_name, new_name): Renames an index.
diff --git a/activerecord/lib/active_record/validations/associated.rb b/activerecord/lib/active_record/validations/associated.rb
index 8a7e185abbe..d98e8663c8a 100644
--- a/activerecord/lib/active_record/validations/associated.rb
+++ b/activerecord/lib/active_record/validations/associated.rb
@@ -42,14 +42,14 @@ module ActiveRecord
# or an array of symbols. (e.g. on: :create or
# on: :custom_validation_context or
# on: [:create, :custom_validation_context])
- # * :if - Specifies a method, proc or string to call to determine
+ # * :if - Specifies a method, proc, or string to call to determine
# if the validation should occur (e.g. if: :allow_validation,
# or if: Proc.new { |user| user.signup_step > 2 }). The method,
# proc or string should return or evaluate to a +true+ or +false+ value.
- # * :unless - Specifies a method, proc or string to call to
+ # * :unless - Specifies a method, proc, or string to call to
# determine if the validation should not occur (e.g. unless: :skip_validation,
# or unless: Proc.new { |user| user.signup_step <= 2 }). The
- # method, proc or string should return or evaluate to a +true+ or +false+
+ # method, proc, or string should return or evaluate to a +true+ or +false+
# value.
def validates_associated(*attr_names)
validates_with AssociatedValidator, _merge_attributes(attr_names)
diff --git a/activerecord/lib/active_record/validations/presence.rb b/activerecord/lib/active_record/validations/presence.rb
index 75e97e1997b..743608a7c8e 100644
--- a/activerecord/lib/active_record/validations/presence.rb
+++ b/activerecord/lib/active_record/validations/presence.rb
@@ -50,11 +50,11 @@ module ActiveRecord
# or an array of symbols. (e.g. on: :create or
# on: :custom_validation_context or
# on: [:create, :custom_validation_context])
- # * :if - Specifies a method, proc or string to call to determine if
+ # * :if - Specifies a method, proc, or string to call to determine if
# the validation should occur (e.g. if: :allow_validation, or
# if: Proc.new { |user| user.signup_step > 2 }). The method, proc
# or string should return or evaluate to a +true+ or +false+ value.
- # * :unless - Specifies a method, proc or string to call to determine
+ # * :unless - Specifies a method, proc, or string to call to determine
# if the validation should not occur (e.g. unless: :skip_validation,
# or unless: Proc.new { |user| user.signup_step <= 2 }). The method,
# proc or string should return or evaluate to a +true+ or +false+ value.
diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb
index 5e5ee761d71..4a4f8aa3413 100644
--- a/activerecord/lib/active_record/validations/uniqueness.rb
+++ b/activerecord/lib/active_record/validations/uniqueness.rb
@@ -166,14 +166,14 @@ module ActiveRecord
# attribute is +nil+ (default is +false+).
# * :allow_blank - If set to +true+, skips this validation if the
# attribute is blank (default is +false+).
- # * :if - Specifies a method, proc or string to call to determine
+ # * :if - Specifies a method, proc, or string to call to determine
# if the validation should occur (e.g. if: :allow_validation,
# or if: Proc.new { |user| user.signup_step > 2 }). The method,
# proc or string should return or evaluate to a +true+ or +false+ value.
- # * :unless - Specifies a method, proc or string to call to
+ # * :unless - Specifies a method, proc, or string to call to
# determine if the validation should not occur (e.g. unless: :skip_validation,
# or unless: Proc.new { |user| user.signup_step <= 2 }). The
- # method, proc or string should return or evaluate to a +true+ or +false+
+ # method, proc, or string should return or evaluate to a +true+ or +false+
# value.
#
# === Concurrency and integrity
diff --git a/activesupport/lib/active_support/core_ext/numeric/conversions.rb b/activesupport/lib/active_support/core_ext/numeric/conversions.rb
index d8196bd5841..af672dd7830 100644
--- a/activesupport/lib/active_support/core_ext/numeric/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/numeric/conversions.rb
@@ -7,7 +7,7 @@ module ActiveSupport
module NumericWithFormat
# Provides options for converting numbers into formatted strings.
# Options are provided for phone numbers, currency, percentage,
- # precision, positional notation, file size and pretty printing.
+ # precision, positional notation, file size, and pretty printing.
#
# This method is aliased to to_formatted_s.
#
diff --git a/activesupport/lib/active_support/core_ext/securerandom.rb b/activesupport/lib/active_support/core_ext/securerandom.rb
index ef812f7e1af..fa6b68b1019 100644
--- a/activesupport/lib/active_support/core_ext/securerandom.rb
+++ b/activesupport/lib/active_support/core_ext/securerandom.rb
@@ -12,7 +12,7 @@ module SecureRandom
#
# If _n_ is not specified or is +nil+, 16 is assumed. It may be larger in the future.
#
- # The result may contain alphanumeric characters except 0, O, I and l.
+ # The result may contain alphanumeric characters except 0, O, I, and l.
#
# p SecureRandom.base58 # => "4kUgL2pdQMSCQtjE"
# p SecureRandom.base58(24) # => "77TMHrHJFvFDwodq8w7Ev2m7"
diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb
index 09553d34002..31ef3f21baf 100644
--- a/activesupport/lib/active_support/core_ext/time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/time/calculations.rb
@@ -126,8 +126,8 @@ class Time
# Returns a new Time where one or more of the elements have been changed according
# to the +options+ parameter. The time options (:hour, :min,
# :sec, :usec, :nsec) reset cascadingly, so if only
- # the hour is passed, then minute, sec, usec and nsec is set to 0. If the hour
- # and minute is passed, then sec, usec and nsec is set to 0. The +options+ parameter
+ # the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour
+ # and minute is passed, then sec, usec, and nsec is set to 0. The +options+ parameter
# takes a hash with any of these keys: :year, :month, :day,
# :hour, :min, :sec, :usec, :nsec,
# :offset. Pass either :usec or :nsec, not both.
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index edbdaef368e..a2b88788ddd 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -4,7 +4,7 @@ require "singleton"
module ActiveSupport
# \Deprecation specifies the API used by Rails to deprecate methods, instance
- # variables, objects and constants.
+ # variables, objects, and constants.
class Deprecation
# active_support.rb sets an autoload for ActiveSupport::Deprecation.
#
diff --git a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb
index 615376d0343..1584f7157a2 100644
--- a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb
+++ b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb
@@ -26,7 +26,7 @@ module ActiveSupport
end
# DeprecatedObjectProxy transforms an object into a deprecated one. It
- # takes an object, a deprecation message and optionally a deprecator. The
+ # takes an object, a deprecation message, and optionally a deprecator. The
# deprecator defaults to +ActiveSupport::Deprecator+ if none is specified.
#
# deprecated_object = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(Object.new, "This object is now deprecated")
diff --git a/activesupport/lib/active_support/error_reporter.rb b/activesupport/lib/active_support/error_reporter.rb
index e1dbc3e991d..8219a3ecf4e 100644
--- a/activesupport/lib/active_support/error_reporter.rb
+++ b/activesupport/lib/active_support/error_reporter.rb
@@ -28,7 +28,7 @@ module ActiveSupport
# end
#
# Additionally a +severity+ can be passed along to communicate how important the error report is.
- # +severity+ can be one of +:error+, +:warning+ or +:info+. Handled errors default to the +:warning+
+ # +severity+ can be one of +:error+, +:warning+, or +:info+. Handled errors default to the +:warning+
# severity, and unhandled ones to +:error+.
#
# Both +handle+ and +record+ pass through the return value from the block. In the case of +handle+
diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb
index 86ad815b313..e2a418926c9 100644
--- a/activesupport/lib/active_support/inflector/transliterate.rb
+++ b/activesupport/lib/active_support/inflector/transliterate.rb
@@ -59,7 +59,7 @@ module ActiveSupport
# transliterate('Jürgen', locale: :de)
# # => "Juergen"
#
- # Transliteration is restricted to UTF-8, US-ASCII and GB18030 strings.
+ # Transliteration is restricted to UTF-8, US-ASCII, and GB18030 strings.
# Other encodings will raise an ArgumentError.
def transliterate(string, replacement = "?", locale: nil)
string = string.dup if string.frozen?
diff --git a/activesupport/lib/active_support/log_subscriber/test_helper.rb b/activesupport/lib/active_support/log_subscriber/test_helper.rb
index 586dc647230..b528a7fc10f 100644
--- a/activesupport/lib/active_support/log_subscriber/test_helper.rb
+++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb
@@ -33,7 +33,7 @@ module ActiveSupport
# The messages are available in the @logger instance, which is a logger with
# limited powers (it actually does not send anything to your output), and
# you can collect them doing @logger.logged(level), where level is the level
- # used in logging, like info, debug, warn and so on.
+ # used in logging, like info, debug, warn, and so on.
module TestHelper
def setup # :nodoc:
@logger = MockLogger.new
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index e967bf0ea00..99b76281487 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -13,7 +13,7 @@ module ActiveSupport
# system's ENV['TZ'] zone.
#
# You shouldn't ever need to create a TimeWithZone instance directly via +new+.
- # Instead use methods +local+, +parse+, +at+ and +now+ on TimeZone instances,
+ # Instead use methods +local+, +parse+, +at+, and +now+ on TimeZone instances,
# and +in_time_zone+ on Time and DateTime instances.
#
# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)'
@@ -395,8 +395,8 @@ module ActiveSupport
# Returns a new +ActiveSupport::TimeWithZone+ where one or more of the elements have
# been changed according to the +options+ parameter. The time options (:hour,
# :min, :sec, :usec, :nsec) reset cascadingly,
- # so if only the hour is passed, then minute, sec, usec and nsec is set to 0. If the
- # hour and minute is passed, then sec, usec and nsec is set to 0. The +options+
+ # so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the
+ # hour and minute is passed, then sec, usec, and nsec is set to 0. The +options+
# parameter takes a hash with any of these keys: :year, :month,
# :day, :hour, :min, :sec, :usec,
# :nsec, :offset, :zone. Pass either :usec
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
index 1650b91181c..d4d6b07c7c4 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -13,7 +13,7 @@ module ActiveSupport
# (e.g., "Eastern Time (US & Canada)" instead of "America/New_York").
# * Lazily load TZInfo::Timezone instances only when they're needed.
# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+,
- # +parse+, +at+ and +now+ methods.
+ # +parse+, +at+, and +now+ methods.
#
# If you set config.time_zone in the Rails Application, you can
# access this TimeZone object via Time.zone:
diff --git a/railties/lib/minitest/rails_plugin.rb b/railties/lib/minitest/rails_plugin.rb
index 660066bab6b..41d297a0cd7 100644
--- a/railties/lib/minitest/rails_plugin.rb
+++ b/railties/lib/minitest/rails_plugin.rb
@@ -49,7 +49,7 @@ module Minitest
end
# Owes great inspiration to test runner trailblazers like RSpec,
- # minitest-reporters, maxitest and others.
+ # minitest-reporters, maxitest, and others.
def self.plugin_rails_init(options)
unless options[:full_backtrace] || ENV["BACKTRACE"]
# Plugin can run without Rails loaded, check before filtering.
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index 6e8b645fac4..28201fcf67c 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -27,7 +27,7 @@ module Rails
# Besides providing the same configuration as Rails::Engine and Rails::Railtie,
# the application object has several specific configurations, for example
# "cache_classes", "consider_all_requests_local", "filter_parameters",
- # "logger" and so forth.
+ # "logger", and so forth.
#
# Check Rails::Application::Configuration to see them all.
#
@@ -52,9 +52,9 @@ module Rails
# 4) Run config.before_configuration callbacks
# 5) Load config/environments/ENV.rb
# 6) Run config.before_initialize callbacks
- # 7) Run Railtie#initializer defined by railties, engines and application.
+ # 7) Run Railtie#initializer defined by railties, engines, and application.
# One by one, each engine sets up its load paths and routes, and runs its config/initializers/* files.
- # 8) Custom Railtie#initializers added by railties, engines and applications are executed
+ # 8) Custom Railtie#initializers added by railties, engines, and applications are executed
# 9) Build the middleware stack and run to_prepare callbacks
# 10) Run config.before_eager_load and eager_load! if eager_load is true
# 11) Run config.after_initialize callbacks
diff --git a/railties/lib/rails/command.rb b/railties/lib/rails/command.rb
index c0a17b5ff0f..bd70d51d916 100644
--- a/railties/lib/rails/command.rb
+++ b/railties/lib/rails/command.rb
@@ -26,7 +26,7 @@ module Rails
ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development"
end
- # Receives a namespace, arguments and the behavior to invoke the command.
+ # Receives a namespace, arguments, and the behavior to invoke the command.
def invoke(full_namespace, args = [], **config)
namespace = full_namespace = full_namespace.to_s
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 3549ba5a5ce..062494f80ec 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -31,7 +31,7 @@ module Rails
# end
#
# Then ensure that this file is loaded at the top of your config/application.rb
- # (or in your +Gemfile+), and it will automatically load models, controllers and helpers
+ # (or in your +Gemfile+), and it will automatically load models, controllers, and helpers
# inside +app+, load routes at config/routes.rb, load locales at
# config/locales/**/*, and load tasks at lib/tasks/**/*.
#
@@ -192,13 +192,13 @@ module Rails
#
# == Isolated Engine
#
- # Normally when you create controllers, helpers and models inside an engine, they are treated
+ # Normally when you create controllers, helpers, and models inside an engine, they are treated
# as if they were created inside the application itself. This means that all helpers and
# named routes from the application will be available to your engine's controllers as well.
#
# However, sometimes you want to isolate your engine from the application, especially if your engine
# has its own router. To do that, you simply need to call +isolate_namespace+. This method requires
- # you to pass a module where all your controllers, helpers and models should be nested to:
+ # you to pass a module where all your controllers, helpers, and models should be nested to:
#
# module MyEngine
# class Engine < Rails::Engine
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb
index b02933ea0d5..c21920ed8e9 100644
--- a/railties/lib/rails/generators.rb
+++ b/railties/lib/rails/generators.rb
@@ -253,8 +253,8 @@ module Rails
invoke_fallbacks_for(name, base) || invoke_fallbacks_for(context, name)
end
- # Receives a namespace, arguments and the behavior to invoke the generator.
- # It's used as the default entry point for generate, destroy and update
+ # Receives a namespace, arguments, and the behavior to invoke the generator.
+ # It's used as the default entry point for generate, destroy, and update
# commands.
def invoke(namespace, args = ARGV, config = {})
names = namespace.to_s.split(":")