diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 2553d03a71..7f8eb46e79 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -103,7 +103,7 @@ module ActionDispatch # # This cookie will be deleted when the user's browser is closed. # cookies[:user_name] = "david" # - # # Cookie values are String based. Other data types need to be serialized. + # # Cookie values are String-based. Other data types need to be serialized. # cookies[:lat_lon] = JSON.generate([47.68, -122.37]) # # # Sets a cookie that expires in 1 hour. diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index e880995232..9134faaf51 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -140,7 +140,7 @@ module ActionView minute_offset_for_leap_year = leap_years * 1440 # Discount the leap year days when calculating year distance. # e.g. if there are 20 leap year days between 2 dates having the same day - # and month then the based on 365 days calculation + # and month then based on 365 days calculation # the distance in years will come out to over 80 years when in written # English it would read better as about 80 years. minutes_with_offset = distance_in_minutes - minute_offset_for_leap_year diff --git a/activemodel/lib/active_model/translation.rb b/activemodel/lib/active_model/translation.rb index 44c0bf0604..9a7c7ba95a 100644 --- a/activemodel/lib/active_model/translation.rb +++ b/activemodel/lib/active_model/translation.rb @@ -17,7 +17,7 @@ module ActiveModel # # This also provides the required class methods for hooking into the # Rails internationalization API, including being able to define a - # class based +i18n_scope+ and +lookup_ancestors+ to find translations in + # class-based +i18n_scope+ and +lookup_ancestors+ to find translations in # parent classes. module Translation include ActiveModel::Naming diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index c03c631d7a..2b43b2a4fc 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -517,7 +517,7 @@ *Eileen M. Uchitelle* * `ActiveRecord::Calculations.calculate` called with `:average` - (aliased as `ActiveRecord::Calculations.average`) will now use column based + (aliased as `ActiveRecord::Calculations.average`) will now use column-based type casting. This means that floating-point number columns will now be aggregated as `Float` and decimal columns will be aggregated as `BigDecimal`. diff --git a/guides/source/active_model_basics.md b/guides/source/active_model_basics.md index f306867570..73c1bea5dc 100644 --- a/guides/source/active_model_basics.md +++ b/guides/source/active_model_basics.md @@ -123,7 +123,7 @@ irb> person.to_param An object becomes dirty when it has gone through one or more changes to its attributes and has not been saved. `ActiveModel::Dirty` gives the ability to -check whether an object has been changed or not. It also has attribute based +check whether an object has been changed or not. It also has attribute-based accessor methods. Let's consider a Person class with attributes `first_name` and `last_name`: @@ -185,7 +185,7 @@ irb> person.changes => {"first_name"=>[nil, "First Name"]} ``` -#### Attribute based accessor methods +#### Attribute-based accessor methods Track whether the particular attribute has been changed or not. diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md index 858e7fdc89..c9f481feaf 100644 --- a/guides/source/asset_pipeline.md +++ b/guides/source/asset_pipeline.md @@ -1023,7 +1023,7 @@ asset for up to a year. Since most CDNs also cache headers of the request, this the browser then knows that it can store this asset for a very long time before needing to re-request it. -##### CDNs and URL based Cache Invalidation +##### CDNs and URL-based Cache Invalidation Most CDNs will cache contents of an asset based on the complete URL. This means that a request to diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 5b4e00fca9..eb16f3332e 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -1905,7 +1905,7 @@ this gem such as `whitelist_attributes` or `mass_assignment_sanitizer` options. * Rails 4.0 has deprecated `ActiveRecord::TestCase` in favor of `ActiveSupport::TestCase`. -* Rails 4.0 has deprecated the old-style hash based finder API. This means that +* Rails 4.0 has deprecated the old-style hash-based finder API. This means that methods which previously accepted "finder options" no longer do. For example, `Book.find(:all, conditions: { name: '1984' })` has been deprecated in favor of `Book.where(name: '1984')` * All dynamic methods except for `find_by_...` and `find_by_...!` are deprecated.