diff --git a/actioncable/lib/action_cable/channel/naming.rb b/actioncable/lib/action_cable/channel/naming.rb index e487021b5e..9da24777e0 100644 --- a/actioncable/lib/action_cable/channel/naming.rb +++ b/actioncable/lib/action_cable/channel/naming.rb @@ -18,7 +18,7 @@ module ActionCable end end - # Delegates to the class' channel_name + # Delegates to the class's channel_name. delegate :channel_name, to: :class end end diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index 61fc35561e..5605770a93 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -151,12 +151,12 @@ module AbstractController process_action(action_name, *args) end - # Delegates to the class' ::controller_path + # Delegates to the class's ::controller_path. def controller_path self.class.controller_path end - # Delegates to the class' ::action_methods + # Delegates to the class's ::action_methods. def action_methods self.class.action_methods end diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index f58005cdc9..aa2140803a 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -137,7 +137,7 @@ module ActionController false end - # Delegates to the class' controller_name. + # Delegates to the class's controller_name. def controller_name self.class.controller_name end diff --git a/actionpack/lib/action_controller/metal/conditional_get.rb b/actionpack/lib/action_controller/metal/conditional_get.rb index 4d82fae638..861b1a4882 100644 --- a/actionpack/lib/action_controller/metal/conditional_get.rb +++ b/actionpack/lib/action_controller/metal/conditional_get.rb @@ -268,7 +268,7 @@ module ActionController # expires_in 3.hours, public: true, stale_while_revalidate: 60.seconds, stale_if_error: 5.minutes # # HTTP Cache-Control Extensions other values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control - # Any additional key-value pairs are concatenated onto the `Cache-Control` header in the response: + # Any additional key-value pairs are concatenated onto the Cache-Control header in the response: # # expires_in 3.hours, public: true, "s-maxage": 3.hours, "no-transform": true # diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index aae5cf87fc..459313444d 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -185,18 +185,18 @@ module ActionController authenticate_with_http_digest(realm, &password_procedure) || request_http_digest_authentication(realm, message) end - # Authenticate with HTTP Digest, returns true or false + # Authenticate with HTTP \Digest. Returns true or false. def authenticate_with_http_digest(realm = "Application", &password_procedure) HttpAuthentication::Digest.authenticate(request, realm, &password_procedure) end - # Render output including the HTTP Digest authentication header + # Render output including the HTTP \Digest authentication header. def request_http_digest_authentication(realm = "Application", message = nil) HttpAuthentication::Digest.authentication_request(self, realm, message) end end - # Returns false on a valid response, true otherwise + # Returns false on a valid response, true otherwise. def authenticate(request, realm, &password_procedure) request.authorization && validate_digest_response(request, realm, &password_procedure) end @@ -469,7 +469,7 @@ module ActionController rewrite_param_values params_array_from raw_params auth end - # Takes raw_params and turns it into an array of parameters + # Takes raw_params and turns it into an array of parameters. def params_array_from(raw_params) raw_params.map { |param| param.split %r/=(.+)?/ } end diff --git a/actionview/lib/action_view/helpers/text_helper.rb b/actionview/lib/action_view/helpers/text_helper.rb index 98d28bd5b5..649d00e4f7 100644 --- a/actionview/lib/action_view/helpers/text_helper.rb +++ b/actionview/lib/action_view/helpers/text_helper.rb @@ -268,7 +268,7 @@ module ActionView end # Returns +text+ transformed into HTML using simple formatting rules. - # Two or more consecutive newlines(\n\n or \r\n\r\n) are + # Two or more consecutive newlines (\n\n or \r\n\r\n) are # considered a paragraph and wrapped in

tags. One newline # (\n or \r\n) is considered a linebreak and a #
tag is appended. This method does not remove the diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb index 24c2881cc0..dc90930b56 100644 --- a/actionview/lib/action_view/layouts.rb +++ b/actionview/lib/action_view/layouts.rb @@ -183,7 +183,7 @@ module ActionView # be rendered directly, without wrapping a layout around the rendered view. # # Both the :only and :except condition can accept an arbitrary number of method references, so - # #except: [ :rss, :text_only ] is valid, as is except: :rss. + # except: [ :rss, :text_only ] is valid, as is except: :rss. # # == Using a different layout in the action render call # @@ -257,10 +257,13 @@ module ActionView # # Return value of +Proc+ and +Symbol+ arguments should be +String+, +false+, +true+ or +nil+ # with the same meaning as described above. + # # ==== Parameters + # # * layout - The layout to use. # # ==== Options (conditions) + # # * :only - A list of actions to apply this layout to. # * :except - Apply this layout to all actions but this one. def layout(layout, conditions = {}) diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index d5e63c6a05..5ec4581c2e 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -114,13 +114,13 @@ module ActiveModel } end - # Imports one error + # Imports one error. # Imported errors are wrapped as a NestedError, # providing access to original error object. # If attribute or type needs to be overridden, use +override_options+. # # override_options - Hash - # @option override_options [Symbol] :attribute Override the attribute the error belongs to + # @option override_options [Symbol] :attribute Override the attribute the error belongs to. # @option override_options [Symbol] :type Override type of the error. def import(error, override_options = {}) [:attribute, :type].each do |key| diff --git a/activemodel/lib/active_model/type/boolean.rb b/activemodel/lib/active_model/type/boolean.rb index 0a8cc26e30..2530c27c81 100644 --- a/activemodel/lib/active_model/type/boolean.rb +++ b/activemodel/lib/active_model/type/boolean.rb @@ -5,7 +5,7 @@ module ActiveModel # A class that behaves like a boolean type, including rules for coercion of # user input. # - # - "false", "f" , "0", +0+ or any other value in + # - "false", "f", "0", +0+ or any other value in # +FALSE_VALUES+ will be coerced to +false+. # - Empty strings are coerced to +nil+. # - All other values will be coerced to +true+. diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index d0d8509a06..c12bfb3eb9 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -241,7 +241,7 @@ module ActiveModel # class Person # include ActiveModel::Validations # - # attr_accessor :name , :age + # attr_accessor :name, :age # # validates_presence_of :name # validates_inclusion_of :age, in: 0..99 diff --git a/activemodel/lib/active_model/validations/absence.rb b/activemodel/lib/active_model/validations/absence.rb index 3d26c0e661..e2b2e1c2dc 100644 --- a/activemodel/lib/active_model/validations/absence.rb +++ b/activemodel/lib/active_model/validations/absence.rb @@ -24,7 +24,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. def validates_absence_of(*attr_names) validates_with AbsenceValidator, _merge_attributes(attr_names) end diff --git a/activemodel/lib/active_model/validations/callbacks.rb b/activemodel/lib/active_model/validations/callbacks.rb index 38642272f2..faa9abcd3e 100644 --- a/activemodel/lib/active_model/validations/callbacks.rb +++ b/activemodel/lib/active_model/validations/callbacks.rb @@ -112,7 +112,7 @@ module ActiveModel end private - # Overwrite run validations to include callbacks. + # Overwrite run_validations! to include callbacks. def run_validations! _run_validation_callbacks { super } end diff --git a/activemodel/lib/active_model/validations/comparison.rb b/activemodel/lib/active_model/validations/comparison.rb index 1204d19884..f475d14b15 100644 --- a/activemodel/lib/active_model/validations/comparison.rb +++ b/activemodel/lib/active_model/validations/comparison.rb @@ -56,7 +56,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ . - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. # # The validator requires at least one of the following checks to be supplied. # Each will accept a proc, value, or a symbol which corresponds to a method: diff --git a/activemodel/lib/active_model/validations/confirmation.rb b/activemodel/lib/active_model/validations/confirmation.rb index d9c560acf4..1676a83f4a 100644 --- a/activemodel/lib/active_model/validations/confirmation.rb +++ b/activemodel/lib/active_model/validations/confirmation.rb @@ -71,7 +71,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. def validates_confirmation_of(*attr_names) validates_with ConfirmationValidator, _merge_attributes(attr_names) end diff --git a/activemodel/lib/active_model/validations/exclusion.rb b/activemodel/lib/active_model/validations/exclusion.rb index a2e4dd8652..bed4313251 100644 --- a/activemodel/lib/active_model/validations/exclusion.rb +++ b/activemodel/lib/active_model/validations/exclusion.rb @@ -40,7 +40,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. def validates_exclusion_of(*attr_names) validates_with ExclusionValidator, _merge_attributes(attr_names) end diff --git a/activemodel/lib/active_model/validations/format.rb b/activemodel/lib/active_model/validations/format.rb index 92493a2658..fc0fc422fc 100644 --- a/activemodel/lib/active_model/validations/format.rb +++ b/activemodel/lib/active_model/validations/format.rb @@ -104,7 +104,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. def validates_format_of(*attr_names) validates_with FormatValidator, _merge_attributes(attr_names) end diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index bbd99676c3..2781e0170d 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -38,7 +38,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. def validates_inclusion_of(*attr_names) validates_with InclusionValidator, _merge_attributes(attr_names) end diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb index 57db6c6816..41fc8f14ba 100644 --- a/activemodel/lib/active_model/validations/length.rb +++ b/activemodel/lib/active_model/validations/length.rb @@ -118,7 +118,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+ and +:strict+. - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. def validates_length_of(*attr_names) validates_with LengthValidator, _merge_attributes(attr_names) end diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index 166b29df47..85e3f7bbbe 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -190,7 +190,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+ . - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. # # The following checks can also be supplied with a proc or a symbol which # corresponds to a method: diff --git a/activemodel/lib/active_model/validations/presence.rb b/activemodel/lib/active_model/validations/presence.rb index 9ac376c528..3ae5e1bae1 100644 --- a/activemodel/lib/active_model/validations/presence.rb +++ b/activemodel/lib/active_model/validations/presence.rb @@ -30,7 +30,7 @@ module ActiveModel # # There is also a list of default options supported by every validator: # +:if+, +:unless+, +:on+, +:allow_nil+, +:allow_blank+, and +:strict+. - # See ActiveModel::Validations#validates for more information + # See ActiveModel::Validations#validates for more information. def validates_presence_of(*attr_names) validates_with PresenceValidator, _merge_attributes(attr_names) end diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 55593057cf..550152339b 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -180,7 +180,7 @@ module ActiveRecord end # Deletes the +records+ and removes them from this association calling - # +before_remove+ , +after_remove+ , +before_destroy+ and +after_destroy+ callbacks. + # +before_remove+, +after_remove+, +before_destroy+ and +after_destroy+ callbacks. # # Note that this method removes records from the database ignoring the # +:dependent+ option. diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 4a58534da3..aec13db486 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_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index f05aff23fc..7322dc6169 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -240,13 +240,13 @@ module ActiveRecord @pool.connection_class end - # The role (ie :writing) for the current connection. In a + # The role (e.g. +:writing+) for the current connection. In a # non-multi role application, `:writing` is returned. def role @pool.role end - # The shard (ie :default) for the current connection. In + # The shard (e.g. +:default+) for the current connection. In # a non-sharded application, `:default` is returned. def shard @pool.shard diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index fd3d1a83c2..f7ab5867d6 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -104,7 +104,7 @@ module ActiveRecord ## # :singleton-method: - # PostgreSQL supports multiple types for DateTimes. By default if you use `datetime` + # PostgreSQL supports multiple types for DateTimes. By default, if you use `datetime` # in migrations, Rails will translate this to a PostgreSQL "timestamp without time zone". # Change this in an initializer to use another NATIVE_DATABASE_TYPES. For example, to # store DateTimes as "timestamp with time zone": diff --git a/activerecord/lib/active_record/connection_handling.rb b/activerecord/lib/active_record/connection_handling.rb index e563c6a425..54c3ee4c1b 100644 --- a/activerecord/lib/active_record/connection_handling.rb +++ b/activerecord/lib/active_record/connection_handling.rb @@ -108,7 +108,7 @@ module ActiveRecord connections end - # Connects to a role (ex 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/encryption/encryptor.rb b/activerecord/lib/active_record/encryption/encryptor.rb index 5e4b7a331e..3f170a614b 100644 --- a/activerecord/lib/active_record/encryption/encryptor.rb +++ b/activerecord/lib/active_record/encryption/encryptor.rb @@ -26,7 +26,7 @@ module ActiveRecord # # [:key_provider] # Key provider to use for the encryption operation. It will default to - # +ActiveRecord::Encryption.key_provider+ when not provided + # +ActiveRecord::Encryption.key_provider+ when not provided. # # [:cipher_options] # +Cipher+-specific options that will be passed to the Cipher configured in diff --git a/activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb b/activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb index 270890a42e..fb513c4db0 100644 --- a/activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb +++ b/activerecord/lib/active_record/encryption/envelope_encryption_key_provider.rb @@ -4,9 +4,9 @@ module ActiveRecord module Encryption # Implements a simple envelope encryption approach where: # - # * It generates a random data-encryption key for each encryption operation + # * It generates a random data-encryption key for each encryption operation. # * It stores the generated key along with the encrypted payload. It encrypts this key - # with the master key provided in the credential +active_record.encryption.master key+ + # with the master key provided in the credential +active_record.encryption.master key+. # # This provider can work with multiple master keys. It will use the last one for encrypting. # diff --git a/activerecord/lib/active_record/encryption/extended_deterministic_queries.rb b/activerecord/lib/active_record/encryption/extended_deterministic_queries.rb index f4a72ad3fa..73f4681847 100644 --- a/activerecord/lib/active_record/encryption/extended_deterministic_queries.rb +++ b/activerecord/lib/active_record/encryption/extended_deterministic_queries.rb @@ -4,7 +4,7 @@ module ActiveRecord module Encryption # Automatically expand encrypted arguments to support querying both encrypted and unencrypted data # - # Active Record Encryption supports querying the db using deterministic attributes. For example: + # Active Record \Encryption supports querying the db using deterministic attributes. For example: # # Contact.find_by(email_address: "jorge@hey.com") # diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 1f026374dd..d0208fa3f7 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -583,7 +583,7 @@ module ActiveRecord end # This class is used to verify that all migrations have been run before - # loading a web page if config.active_record.migration_error is set to :page_load + # loading a web page if config.active_record.migration_error is set to :page_load. class CheckPending def initialize(app, file_watcher: ActiveSupport::FileUpdateChecker) @app = app diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index 18ceae0220..14b616d21c 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -617,7 +617,7 @@ module ActiveRecord "#{full_table_name_prefix}#{contained}#{undecorated_table_name(model_name)}#{full_table_name_suffix}" else - # STI subclasses always use their superclass' table. + # STI subclasses always use their superclass's table. base_class.table_name end end diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 7a046e09de..11e44b6f54 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -654,7 +654,7 @@ module ActiveRecord # for queries to actually be executed concurrently. Otherwise it defaults to # executing them in the foreground. # - # +load_async+ will also fallback to executing in the foreground in the test environment when transactional + # +load_async+ will also fall back to executing in the foreground in the test environment when transactional # fixtures are enabled. # # If the query was actually executed in the background, the Active Record logs will show diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 24db595695..f4c7a77f4e 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -162,7 +162,7 @@ module ActiveRecord # # users = User.includes(:address, friends: [:address, :followers]) # - # === conditions + # === Conditions # # If you want to add string conditions to your included models, you'll have # to explicitly reference them. For example: diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index c644d863c2..777305d7da 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -600,7 +600,7 @@ module ActiveSupport end end - class CallbackChain # :nodoc:# + class CallbackChain # :nodoc: include Enumerable attr_reader :name, :config diff --git a/activesupport/lib/active_support/core_ext/date/conversions.rb b/activesupport/lib/active_support/core_ext/date/conversions.rb index b75badddfb..88cf5b8c0d 100644 --- a/activesupport/lib/active_support/core_ext/date/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date/conversions.rb @@ -78,7 +78,7 @@ class Date # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC # # NOTE: The :local timezone is Ruby's *process* timezone, i.e. ENV['TZ']. - # If the *application's* timezone is needed, then use +in_time_zone+ instead. + # If the application's timezone is needed, then use +in_time_zone+ instead. def to_time(form = :local) raise ArgumentError, "Expected :local or :utc, got #{form.inspect}." unless [:local, :utc].include?(form) ::Time.public_send(form, year, month, day) diff --git a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb index 21cfeed557..be5dacd67a 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb @@ -201,7 +201,7 @@ module DateAndTime end end - # Short-hand for months_since(3) + # Short-hand for months_since(3). def next_quarter months_since(3) end diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb index 850affafb0..8356c2a333 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb @@ -10,7 +10,7 @@ # of the module. # # Note that it can also be scoped per-fiber if Rails.application.config.active_support.isolation_level -# is set to `:fiber` +# is set to `:fiber`. class Module # Defines a per-thread class attribute and creates class and instance reader methods. # The underlying per-thread class variable is set to +nil+, if it is not previously defined. @@ -21,7 +21,7 @@ class Module # # Current.user = "DHH" # Current.user # => "DHH" - # Thread.new { Current.user }.values # => nil + # Thread.new { Current.user }.value # => nil # # The attribute name must be a valid method name in Ruby. # diff --git a/activesupport/lib/active_support/error_reporter.rb b/activesupport/lib/active_support/error_reporter.rb index 43683c1171..e1dbc3e991 100644 --- a/activesupport/lib/active_support/error_reporter.rb +++ b/activesupport/lib/active_support/error_reporter.rb @@ -29,7 +29,7 @@ module ActiveSupport # # 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, and unhandled ones to +error+. + # severity, and unhandled ones to +:error+. # # Both +handle+ and +record+ pass through the return value from the block. In the case of +handle+ # rescuing an error, a fallback can be provided. The fallback must be a callable whose result will diff --git a/activesupport/lib/active_support/evented_file_update_checker.rb b/activesupport/lib/active_support/evented_file_update_checker.rb index 00e20cd035..5bd4c9930d 100644 --- a/activesupport/lib/active_support/evented_file_update_checker.rb +++ b/activesupport/lib/active_support/evented_file_update_checker.rb @@ -8,8 +8,8 @@ require "active_support/fork_tracker" module ActiveSupport # Allows you to "listen" to changes in a file system. - # The evented file updater does not hit disk when checking for updates - # instead it uses platform specific file system events to trigger a change + # The evented file updater does not hit disk when checking for updates. + # Instead, it uses platform-specific file system events to trigger a change # in state. # # The file checker takes an array of files to watch or a hash specifying directories diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb index c398b25d0f..86ad815b31 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 3f19ef5009..586dc64723 100644 --- a/activesupport/lib/active_support/log_subscriber/test_helper.rb +++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb @@ -27,7 +27,7 @@ module ActiveSupport # # All you need to do is to ensure that your log subscriber is added to # Rails::Subscriber, as in the second line of the code above. The test - # helpers are responsible for setting up the queue, subscriptions and + # helpers are responsible for setting up the queue and subscriptions, and # turning colors in logs off. # # The messages are available in the @logger instance, which is a logger with diff --git a/activesupport/lib/active_support/message_encryptor.rb b/activesupport/lib/active_support/message_encryptor.rb index 486c96b35a..fb595e8788 100644 --- a/activesupport/lib/active_support/message_encryptor.rb +++ b/activesupport/lib/active_support/message_encryptor.rb @@ -22,6 +22,7 @@ module ActiveSupport # crypt = ActiveSupport::MessageEncryptor.new(key) # => # # encrypted_data = crypt.encrypt_and_sign('my secret data') # => "NlFBTTMwOUV5UlA1QlNEN2xkY2d6eThYWWh..." # crypt.decrypt_and_verify(encrypted_data) # => "my secret data" + # # The +decrypt_and_verify+ method will raise an # ActiveSupport::MessageEncryptor::InvalidMessage exception if the data # provided cannot be decrypted or verified. diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb index c7986b83ea..fd44a096ea 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -4,7 +4,7 @@ require "active_support/notifications/instrumenter" require "active_support/notifications/fanout" module ActiveSupport - # = Notifications + # = \Notifications # # ActiveSupport::Notifications provides an instrumentation API for # Ruby. diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 43dc1ccfed..6e8b645fac 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -22,7 +22,7 @@ module Rails # Rails::Application::Bootstrap) and finishing initializers, after all the others # are executed (check Rails::Application::Finisher). # - # == Configuration + # == \Configuration # # Besides providing the same configuration as Rails::Engine and Rails::Railtie, # the application object has several specific configurations, for example @@ -53,7 +53,7 @@ module Rails # 5) Load config/environments/ENV.rb # 6) Run config.before_initialize callbacks # 7) Run Railtie#initializer defined by railties, engines and application. - # One by one, each engine sets up its load paths, routes and runs its config/initializers/* files. + # 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 # 9) Build the middleware stack and run to_prepare callbacks # 10) Run config.before_eager_load and eager_load! if eager_load is true diff --git a/railties/lib/rails/console/helpers.rb b/railties/lib/rails/console/helpers.rb index 39fbc55606..1f894c1532 100644 --- a/railties/lib/rails/console/helpers.rb +++ b/railties/lib/rails/console/helpers.rb @@ -4,14 +4,14 @@ module Rails module ConsoleMethods # Gets the helper methods available to the controller. # - # This method assumes an +ApplicationController+ exists, and it extends +ActionController::Base+ + # This method assumes an +ApplicationController+ exists, and that it extends +ActionController::Base+. def helper ApplicationController.helpers end # Gets a new instance of a controller object. # - # This method assumes an +ApplicationController+ exists, and it extends +ActionController::Base+ + # This method assumes an +ApplicationController+ exists, and that it extends +ActionController::Base+. def controller @controller ||= ApplicationController.new end diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 1849638323..3549ba5a5c 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/**/*. # @@ -457,7 +457,7 @@ module Rails self end - # Load Rake, railties tasks and invoke the registered hooks. + # Load Rake and railties tasks, and invoke the registered hooks. # Check Rails::Railtie.rake_tasks for more info. def load_tasks(app = self) require "rake"