diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index 084f551c72..7670016d6f 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -57,7 +57,7 @@ module ActionController # # redirect_to post_url(@post) and return # - # Passing user input directly into +redirect_to+ is considered dangerous (eg. `redirect_to(params[:location])`). + # Passing user input directly into +redirect_to+ is considered dangerous (e.g. `redirect_to(params[:location])`). # Always use regular expressions or a permitted list when redirecting to a user specified location. def redirect_to(options = {}, response_options = {}) raise ActionControllerError.new("Cannot redirect to nil!") unless options diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 1960e1f57a..92bcd1fb2d 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1307,7 +1307,7 @@ module ActionDispatch # POST /profile # # If you want instances of a model to work with this resource via - # record identification (eg. in +form_with+ or +redirect_to+), you + # record identification (e.g. in +form_with+ or +redirect_to+), you # will need to call resolve[rdoc-ref:CustomUrls#resolve]: # # resource :profile diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index 16de159421..263a23ca9d 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -182,7 +182,7 @@ module ActiveRecord NATIVE_DATABASE_TYPES end - # Returns the current database encoding format as a string, eg: 'UTF-8' + # Returns the current database encoding format as a string, e.g. 'UTF-8' def encoding @connection.encoding.to_s end diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 7162b033d7..d8911b3d45 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -35,7 +35,7 @@ module ActiveRecord # name: Google # url: http://www.google.com # - # This fixture file includes two fixtures. Each YAML fixture (ie. record) is given a name and + # This fixture file includes two fixtures. Each YAML fixture (i.e. record) is given a name and # is followed by an indented list of key/value pairs in the "key: value" format. Records are # separated by a blank line for your viewing pleasure. # diff --git a/activerecord/lib/active_record/migration/compatibility.rb b/activerecord/lib/active_record/migration/compatibility.rb index fc6327f823..3a1687db50 100644 --- a/activerecord/lib/active_record/migration/compatibility.rb +++ b/activerecord/lib/active_record/migration/compatibility.rb @@ -14,7 +14,7 @@ module ActiveRecord end # This file exists to ensure that old migrations run the same way they did before a Rails upgrade. - # eg. if you write a migration on Rails 6.1, then upgrade to Rails 7, the migration should do the same thing to your + # e.g. if you write a migration on Rails 6.1, then upgrade to Rails 7, the migration should do the same thing to your # database as it did when you were running Rails 6.1 # # "Current" is an alias for `ActiveRecord::Migration`, it represents the current Rails version. diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb index c7d83b8c6a..ce7967d9cf 100644 --- a/activerecord/lib/active_record/model_schema.rb +++ b/activerecord/lib/active_record/model_schema.rb @@ -501,7 +501,7 @@ module ActiveRecord # # The most common usage pattern for this method is probably in a migration, # when just after creating a table you want to populate it with some default - # values, eg: + # values, e.g.: # # class CreateJobLevels < ActiveRecord::Migration[7.0] # def up diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 865bdce6c9..8c3693c2f2 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -37,7 +37,7 @@ *Steve Laing* -* `Time#change` and methods that call it (eg. `Time#advance`) will now +* `Time#change` and methods that call it (e.g. `Time#advance`) will now return a `Time` with the timezone argument provided, if the caller was initialized with a timezone argument. diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb index 4af8d90885..dbf435292b 100644 --- a/activesupport/lib/active_support/testing/assertions.rb +++ b/activesupport/lib/active_support/testing/assertions.rb @@ -253,7 +253,7 @@ module ActiveSupport warning = <<~MSG #{self.class} - #{name}: #{e.error.class} raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. - Other block based assertions (eg. `#{assertion}`) can be used, as long as `assert_raises` is inside their block. + Other block based assertions (e.g. `#{assertion}`) can be used, as long as `assert_raises` is inside their block. MSG tagged_logger.warn warning end diff --git a/activesupport/test/test_case_test.rb b/activesupport/test/test_case_test.rb index f900093e4b..68dfe48412 100644 --- a/activesupport/test/test_case_test.rb +++ b/activesupport/test/test_case_test.rb @@ -363,7 +363,7 @@ class ExceptionsInsideAssertionsTest < ActiveSupport::TestCase expected = <<~MSG ExceptionsInsideAssertionsTest - test_warning_is_logged_if_caught_internally: ArgumentError raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. - Other block based assertions (eg. `assert_no_changes`) can be used, as long as `assert_raises` is inside their block. + Other block based assertions (e.g. `assert_no_changes`) can be used, as long as `assert_raises` is inside their block. MSG assert @out.string.include?(expected), @out.string end @@ -388,7 +388,7 @@ class ExceptionsInsideAssertionsTest < ActiveSupport::TestCase expected = <<~MSG ExceptionsInsideAssertionsTest - test_fails_and_warning_is_logged_if_wrong_error_caught: ArgumentError raised. If you expected this exception, use `assert_raises` as near to the code that raises as possible. - Other block based assertions (eg. `assert_no_changes`) can be used, as long as `assert_raises` is inside their block. + Other block based assertions (e.g. `assert_no_changes`) can be used, as long as `assert_raises` is inside their block. MSG assert @out.string.include?(expected), @out.string assert error.message.include?("ArgumentError: ArgumentError") diff --git a/ci/qunit-selenium-runner.rb b/ci/qunit-selenium-runner.rb index 52eb71e107..1451fc8a54 100644 --- a/ci/qunit-selenium-runner.rb +++ b/ci/qunit-selenium-runner.rb @@ -26,6 +26,6 @@ driver.quit puts "Time: #{result.duration} seconds, Total: #{result.assertions[:total]}, Passed: #{result.assertions[:passed]}, Failed: #{result.assertions[:failed]}" if result.tests[:failed] > 0 - puts "Qunit output follows. Look for lines that have failures, eg (1, n, n) - those are your failing lines\r\n\r\n#{result.raw_output}" + puts "Qunit output follows. Look for lines that have failures, e.g. (1, n, n) - those are your failing lines\r\n\r\n#{result.raw_output}" end exit(result.tests[:failed] > 0 ? 1 : 0) diff --git a/guides/source/active_storage_overview.md b/guides/source/active_storage_overview.md index db69f84388..763a8b63fe 100644 --- a/guides/source/active_storage_overview.md +++ b/guides/source/active_storage_overview.md @@ -769,7 +769,7 @@ Active Storage supports representing a variety of files. You can call [`representation`][] on an attachment to display an image variant, or a preview of a video or PDF. Before calling `representation`, check if the attachment can be represented by calling [`representable?`]. Some file formats -can't be previewed by Active Storage out of the box (eg. Word documents); if +can't be previewed by Active Storage out of the box (e.g. Word documents); if `representable?` returns false you may want to [link to](#serving-files) the file instead. @@ -820,7 +820,7 @@ image_tag file.representation(resize_to_limit: [100, 100]).processed.url The Active Storage variant tracker improves performance of this, by storing a record in the database if the requested representation has been processed before. -Thus, the above code will only make an API call to the remote service (eg. S3) +Thus, the above code will only make an API call to the remote service (e.g. S3) once, and once a variant is stored, will use that. The variant tracker runs automatically, but can be disabled through `config.active_storage.track_variants`. @@ -1361,7 +1361,7 @@ end ``` If you're not running parallel tests, use `Minitest.after_run` or the equivalent for your test -framework (eg. `after(:suite)` for RSpec): +framework (e.g. `after(:suite)` for RSpec): ```ruby # test_helper.rb diff --git a/railties/lib/rails/application/bootstrap.rb b/railties/lib/rails/application/bootstrap.rb index e6f24eff69..dd198f2a2e 100644 --- a/railties/lib/rails/application/bootstrap.rb +++ b/railties/lib/rails/application/bootstrap.rb @@ -44,7 +44,7 @@ module Rails logger.level = ActiveSupport::Logger::WARN logger.warn( "Rails Error: Unable to access log file. Please ensure that #{path} exists and is writable " \ - "(ie, make it writable for user and group: chmod 0664 #{path}). " \ + "(i.e. make it writable for user and group: chmod 0664 #{path}). " \ "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." ) logger