Skip to content

Commit e37adfe

Browse files
Add Oxford commas [ci-skip]
1 parent 07bee94 commit e37adfe

File tree

53 files changed

+105
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+105
-105
lines changed

actioncable/lib/action_cable/connection/test_case.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def initialize(request)
8686
# end
8787
#
8888
# +connect+ accepts additional information about the HTTP request with the
89-
# +params+, +headers+, +session+ and Rack +env+ options.
89+
# +params+, +headers+, +session+, and Rack +env+ options.
9090
#
9191
# def test_connect_with_headers_and_query_string
9292
# connect params: { user_id: 1 }, headers: { "X-API-TOKEN" => "secret-my" }

actionmailer/lib/action_mailer/base.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module ActionMailer
106106
# You got a new note!
107107
# <%= truncate(@note.body, length: 25) %>
108108
#
109-
# If you need to access the subject, from or the recipients in the view, you can do that through message object:
109+
# If you need to access the subject, from, or the recipients in the view, you can do that through message object:
110110
#
111111
# You got a new note from <%= message.from %>!
112112
# <%= truncate(@note.body, length: 25) %>
@@ -493,28 +493,28 @@ def unregister_interceptors(*interceptors)
493493
end
494494

495495
# Register an Observer which will be notified when mail is delivered.
496-
# Either a class, string or symbol can be passed in as the Observer.
496+
# Either a class, string, or symbol can be passed in as the Observer.
497497
# If a string or symbol is passed in it will be camelized and constantized.
498498
def register_observer(observer)
499499
Mail.register_observer(observer_class_for(observer))
500500
end
501501

502502
# Unregister a previously registered Observer.
503-
# Either a class, string or symbol can be passed in as the Observer.
503+
# Either a class, string, or symbol can be passed in as the Observer.
504504
# If a string or symbol is passed in it will be camelized and constantized.
505505
def unregister_observer(observer)
506506
Mail.unregister_observer(observer_class_for(observer))
507507
end
508508

509509
# Register an Interceptor which will be called before mail is sent.
510-
# Either a class, string or symbol can be passed in as the Interceptor.
510+
# Either a class, string, or symbol can be passed in as the Interceptor.
511511
# If a string or symbol is passed in it will be camelized and constantized.
512512
def register_interceptor(interceptor)
513513
Mail.register_interceptor(observer_class_for(interceptor))
514514
end
515515

516516
# Unregister a previously registered Interceptor.
517-
# Either a class, string or symbol can be passed in as the Interceptor.
517+
# Either a class, string, or symbol can be passed in as the Interceptor.
518518
# If a string or symbol is passed in it will be camelized and constantized.
519519
def unregister_interceptor(interceptor)
520520
Mail.unregister_interceptor(observer_class_for(interceptor))

actionpack/lib/action_controller/metal/http_authentication.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require "active_support/core_ext/array/access"
66

77
module ActionController
8-
# HTTP Basic, Digest and Token authentication.
8+
# HTTP Basic, Digest, and Token authentication.
99
module HttpAuthentication
1010
# HTTP \Basic authentication.
1111
#
@@ -301,7 +301,7 @@ def secret_token(request)
301301
#
302302
# An implementation might choose not to accept a previously used nonce or a previously used digest, in order to
303303
# protect against a replay attack. Or, an implementation might choose to use one-time nonces or digests for
304-
# POST, PUT, or PATCH requests and a time-stamp for GET requests. For more details on the issues involved see Section 4
304+
# POST, PUT, or PATCH requests, and a time-stamp for GET requests. For more details on the issues involved see Section 4
305305
# of this document.
306306
#
307307
# The nonce is opaque to the client. Composed of Time, and hash of Time with secret

actionpack/lib/action_controller/metal/streaming.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module ActionController # :nodoc:
7272
# variables set in the template to be used in the layout, they won't
7373
# work once you move to streaming. The proper way to communicate
7474
# between layout and template, regardless of whether you use streaming
75-
# or not, is by using +content_for+, +provide+ and +yield+.
75+
# or not, is by using +content_for+, +provide+, and +yield+.
7676
#
7777
# Take a simple example where the layout expects the template to tell
7878
# which title to use:
@@ -132,7 +132,7 @@ module ActionController # :nodoc:
132132
# That said, when streaming, you need to properly check your templates
133133
# and choose when to use +provide+ and +content_for+.
134134
#
135-
# == Headers, cookies, session and flash
135+
# == Headers, cookies, session, and flash
136136
#
137137
# When streaming, the HTTP headers are sent to the client right before
138138
# it renders the first line. This means that, modifying headers, cookies,

actionpack/lib/action_controller/metal/url_for.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module ActionController
88
# URL options like the +host+. In order to do so, this module requires the host class
99
# to implement +env+ which needs to be Rack-compatible and +request+
1010
# which is either an instance of +ActionDispatch::Request+ or an object
11-
# that responds to the +host+, +optional_port+, +protocol+ and
11+
# that responds to the +host+, +optional_port+, +protocol+, and
1212
# +symbolized_path_parameter+ methods.
1313
#
1414
# class RootUrl

actionpack/lib/action_controller/test_case.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def load!
241241
# == Basic example
242242
#
243243
# Functional tests are written as follows:
244-
# 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+ or +head+ method to simulate
244+
# 1. First, one uses the +get+, +post+, +patch+, +put+, +delete+, or +head+ method to simulate
245245
# an HTTP request.
246246
# 2. Then, one asserts whether the current state is as expected. "State" can be anything:
247247
# the controller's HTTP response, the database contents, etc.
@@ -391,7 +391,7 @@ def determine_default_controller_class(name)
391391
#
392392
# You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with
393393
# +post+, +patch+, +put+, +delete+, and +head+.
394-
# Example sending parameters, session and setting a flash message:
394+
# Example sending parameters, session, and setting a flash message:
395395
#
396396
# get :show,
397397
# params: { id: 7 },
@@ -461,7 +461,7 @@ def head(action, **args)
461461
# session: { user_id: 1 },
462462
# flash: { notice: 'This is flash message' }
463463
#
464-
# To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+ and +HEAD+ requests
464+
# To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, and +HEAD+ requests
465465
# prefer using #get, #post, #patch, #put, #delete and #head methods
466466
# respectively which will make tests more expressive.
467467
#

actionpack/lib/action_dispatch/http/request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def remote_ip=(remote_ip)
298298
ACTION_DISPATCH_REQUEST_ID = "action_dispatch.request_id" # :nodoc:
299299

300300
# Returns the unique request id, which is based on either the X-Request-Id header that can
301-
# be generated by a firewall, load balancer, or web server or by the RequestId middleware
301+
# be generated by a firewall, load balancer, or web server, or by the RequestId middleware
302302
# (which sets the action_dispatch.request_id environment variable).
303303
#
304304
# This unique ID is useful for tracing a request from end-to-end as part of logging or debugging.

actionpack/lib/action_dispatch/routing.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module ActionDispatch
2828
#
2929
# Resource routing allows you to quickly declare all of the common routes
3030
# for a given resourceful controller. Instead of declaring separate routes
31-
# for your +index+, +show+, +new+, +edit+, +create+, +update+ and +destroy+
31+
# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+
3232
# actions, a resourceful route declares them in a single line of code:
3333
#
3434
# resources :photos

actionpack/lib/action_dispatch/routing/mapper.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,10 @@ module Base
390390
#
391391
# If you want to expose your action to both GET and POST, use:
392392
#
393-
# # sets :controller, :action and :id in params
393+
# # sets :controller, :action, and :id in params
394394
# match ':controller/:action/:id', via: [:get, :post]
395395
#
396-
# Note that +:controller+, +:action+ and +:id+ are interpreted as URL
396+
# Note that +:controller+, +:action+, and +:id+ are interpreted as URL
397397
# query parameters and thus available through +params+ in an action.
398398
#
399399
# If you want to expose your action to GET, use +get+ in the router:
@@ -906,7 +906,7 @@ def controller(controller)
906906
#
907907
# === Options
908908
#
909-
# The +:path+, +:as+, +:module+, +:shallow_path+ and +:shallow_prefix+
909+
# The +:path+, +:as+, +:module+, +:shallow_path+, and +:shallow_prefix+
910910
# options all default to the name of the namespace.
911911
#
912912
# For options, see <tt>Base#match</tt>. For +:shallow_path+ option, see
@@ -1082,7 +1082,7 @@ def merge_to_scope(parent, child)
10821082

10831083
# Resource routing allows you to quickly declare all of the common routes
10841084
# for a given resourceful controller. Instead of declaring separate routes
1085-
# for your +index+, +show+, +new+, +edit+, +create+, +update+ and +destroy+
1085+
# for your +index+, +show+, +new+, +edit+, +create+, +update+, and +destroy+
10861086
# actions, a resourceful route declares them in a single line of code:
10871087
#
10881088
# resources :photos

actionpack/lib/action_dispatch/routing/url_for.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module Routing
7070
# resources :users
7171
#
7272
# This generates, among other things, the method <tt>users_path</tt>. By default,
73-
# this method is accessible from your controllers, views and mailers. If you need
73+
# this method is accessible from your controllers, views, and mailers. If you need
7474
# to access this auto-generated method from other places (such as a model), then
7575
# you can do that by including Rails.application.routes.url_helpers in your class:
7676
#
@@ -115,7 +115,7 @@ def url_options
115115
default_url_options
116116
end
117117

118-
# Generate a URL based on the options provided, default_url_options and the
118+
# Generate a URL based on the options provided, default_url_options, and the
119119
# routes defined in routes.rb. The following options are supported:
120120
#
121121
# * <tt>:only_path</tt> - If true, the relative URL is returned. Defaults to +false+.
@@ -154,7 +154,7 @@ def url_options
154154
# # => '/myapp/tasks/testing'
155155
#
156156
# Missing routes keys may be filled in from the current request's parameters
157-
# (e.g. +:controller+, +:action+, +:id+ and any other parameters that are
157+
# (e.g. +:controller+, +:action+, +:id+, and any other parameters that are
158158
# placed in the path). Given that the current action has been reached
159159
# through <tt>GET /users/1</tt>:
160160
#

0 commit comments

Comments
 (0)