aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/CHANGELOG.md80
-rw-r--r--guides/source/asset_pipeline.md2
-rw-r--r--guides/source/association_basics.md4
-rw-r--r--guides/source/getting_started.md18
4 files changed, 57 insertions, 47 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 89cea5a7cb..82d7ab353d 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -29,8 +29,8 @@
*James Cox*
-* Dont enroll records in the transaction if they dont have commit callbacks.
- That was causing a memory grow problem when creating a lot of records inside a transaction.
+* Don't enroll records in the transaction if they don't have commit callbacks.
+ This was causing a memory leak when creating many records inside a transaction.
Fixes #15549.
@@ -43,11 +43,11 @@
*Sean Griffin*
-* Add `SchemaMigration.create_table` support any unicode charsets for MySQL.
+* Add `SchemaMigration.create_table` support for any unicode charsets with MySQL.
*Ryuta Kamizono*
-* PostgreSQL, no longer disables user triggers if system triggers can't be
+* PostgreSQL no longer disables user triggers if system triggers can't be
disabled. Disabling user triggers does not fulfill what the method promises.
Rails currently requires superuser privileges for this method.
@@ -61,12 +61,12 @@
*Toby Ovod-Everett*, *Yves Senn*
-* PostgreSQL, print warning message if `disable_referential_integrity` fails
- due to missing permissions.
+* In PostgreSQL, print a warning message if `disable_referential_integrity`
+ fails due to missing permissions.
*Andrey Nering*, *Yves Senn*
-* Allow `:limit` option for MySQL bigint primary key support.
+* Allow a `:limit` option for MySQL bigint primary key support.
Example:
@@ -89,7 +89,7 @@
*Josef Šimánek*
* Fixed ActiveRecord::Relation#becomes! and changed_attributes issues for type
- column.
+ columns.
Fixes #17139.
@@ -99,7 +99,7 @@
*Ryuta Kamizono*
-* Allow `:precision` option for time type columns.
+* Allow a `:precision` option for time type columns.
*Ryuta Kamizono*
@@ -116,10 +116,10 @@
recipients: commentable.recipients }
end
- That's what you want the bulk of the time. New comment creates a new
- Notification. But there may well be off cases, like copying a commentable
- and its comments, where you don't want that. So you'd have a concern
- something like this:
+ That's what you want the bulk of the time. A new comment creates a new
+ Notification. There may be edge cases where you don't want that, like
+ when copying a commentable and its comments, in which case write a
+ concern with something like this:
module Copyable
def copy_to(destination)
@@ -138,7 +138,7 @@
*Hyonjee Joo*
-* Deprecated passing of `start` value to `find_in_batches` and `find_each`
+* Deprecate passing of `start` value to `find_in_batches` and `find_each`
in favour of `begin_at` value.
*Vipul A M*
@@ -147,9 +147,10 @@
*Tõnis Simo*
-* Use SQL COUNT and LIMIT 1 queries for `none?` and `one?` methods if no block or limit is given,
- instead of loading the entire collection to memory.
- This applies to relations (e.g. `User.all`) as well as associations (e.g. `account.users`)
+* Use SQL COUNT and LIMIT 1 queries for `none?` and `one?` methods
+ if no block or limit is given, instead of loading the entire
+ collection into memory. This applies to relations (e.g. `User.all`)
+ as well as associations (e.g. `account.users`)
# Before:
@@ -198,16 +199,16 @@
*Vipul A M*
-* Fix rounding problem for PostgreSQL timestamp column.
+* Fix a rounding problem for PostgreSQL timestamp columns.
- If timestamp column have the precision, it need to format according to
- the precision of timestamp column.
+ If a timestamp column has a precision specified, it needs to
+ format according to that.
*Ryuta Kamizono*
* Respect the database default charset for `schema_migrations` table.
- The charset of `version` column in `schema_migrations` table is depend
+ The charset of `version` column in `schema_migrations` table depends
on the database default charset and collation rather than the encoding
of the connection.
@@ -215,12 +216,12 @@
* Raise `ArgumentError` when passing `nil` or `false` to `Relation#merge`.
- These are not valid values to merge in a relation so it should warn the users
+ These are not valid values to merge in a relation, so it should warn users
early.
*Rafael Mendonça França*
-* Use `SCHEMA` instead of `DB_STRUCTURE` for specifying structure file.
+* Use `SCHEMA` instead of `DB_STRUCTURE` for specifying a structure file.
This makes the db:structure tasks consistent with test:load_structure.
@@ -232,7 +233,7 @@
*Sean Griffin*
-* Fixed several edge cases which could result in a counter cache updating
+* Fix several edge cases which could result in a counter cache updating
twice or not updating at all for `has_many` and `has_many :through`.
Fixes #10865.
@@ -265,11 +266,13 @@
*Sammy Larbi*
* Change the default error message from `can't be blank` to `must exist` for
- the presence validator of the `:required` option on `belongs_to`/`has_one` associations.
+ the presence validator of the `:required` option on `belongs_to`/`has_one`
+ associations.
*Henrik Nygren*
-* Fixed ActiveRecord::Relation#group method when argument is SQL reserved key word:
+* Fixed ActiveRecord::Relation#group method when an argument is an SQL
+ reserved key word:
Example:
@@ -400,7 +403,7 @@
*Yves Senn*
-* Remove deprecation when modifying a relation with cached arel.
+* Remove deprecation when modifying a relation with cached Arel.
This raises an `ImmutableRelation` error instead.
*Yves Senn*
@@ -490,13 +493,13 @@
*Florian Weingarten*
-* Fixed setting of foreign_key for through associations while building of new record.
+* Fix setting of foreign_key for through associations when building a new record.
Fixes #12698.
*Ivan Antropov*
-* Improve a dump of the primary key support. If it is not a default primary key,
+* Improve dumping of the primary key. If it is not a default primary key,
correctly dump the type and options.
Fixes #14169, #16599.
@@ -514,18 +517,18 @@
*Ryuta Kamizono*
-* Allow precision option for MySQL datetimes.
+* Allow a precision option for MySQL datetimes.
*Ryuta Kamizono*
-* Fixed automatic inverse_of for models nested in module.
+* Fixed automatic `inverse_of` for models nested in a module.
*Andrew McCloud*
* Change `ActiveRecord::Relation#update` behavior so that it can
be called without passing ids of the records to be updated.
- This change allows to update multiple records returned by
+ This change allows updating multiple records returned by
`ActiveRecord::Relation` with callbacks and validations.
# Before
@@ -557,6 +560,13 @@
*Rafael Mendonça França*
+* Fix change detection problem for PostgreSQL bytea type and
+ `ArgumentError: string contains null byte` exception with pg-0.18.
+
+ Fixes #17680.
+
+ *Lars Kanis*
+
* When a table has a composite primary key, the `primary_key` method for
SQLite3 and PostgreSQL adapters was only returning the first field of the key.
Ensures that it will return nil instead, as Active Record doesn't support
@@ -566,7 +576,7 @@
*arthurnn*
-* `validates_size_of` / `validates_length_of` do not count records,
+* `validates_size_of` / `validates_length_of` do not count records
which are `marked_for_destruction?`.
Fixes #7247.
@@ -608,7 +618,7 @@
*Ryuta Kamizono*
-* Support for any type primary key.
+* Support for any type of primary key.
Fixes #14194.
@@ -634,7 +644,7 @@
*Yves Senn*
-* Fixes bug with 'ActiveRecord::Type::Numeric' that causes negative values to
+* Fix bug with 'ActiveRecord::Type::Numeric' that caused negative values to
be marked as having changed when set to the same negative value.
Closes #18161.
diff --git a/guides/source/asset_pipeline.md b/guides/source/asset_pipeline.md
index c9ae256c83..816bff3784 100644
--- a/guides/source/asset_pipeline.md
+++ b/guides/source/asset_pipeline.md
@@ -974,7 +974,7 @@ http://mycdnsubdomain.fictional-cdn.com/assets/smile.png
If the CDN has a copy of `smile.png` it will serve it to the browser and your
server doesn't even know it was requested. If the CDN does not have a copy it
-will try to find it a the "origin" `example.com/assets/smile.png` and then store
+will try to find it at the "origin" `example.com/assets/smile.png` and then store
it for future use.
If you want to serve only some assets from your CDN, you can use custom `:host`
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md
index 280c3008e9..ec6017ff73 100644
--- a/guides/source/association_basics.md
+++ b/guides/source/association_basics.md
@@ -933,7 +933,7 @@ Passing `true` to the `:polymorphic` option indicates that this is a polymorphic
##### `:touch`
-If you set the `:touch` option to `:true`, then the `updated_at` or `updated_on` timestamp on the associated object will be set to the current time whenever this object is saved or destroyed:
+If you set the `:touch` option to `true`, then the `updated_at` or `updated_on` timestamp on the associated object will be set to the current time whenever this object is saved or destroyed:
```ruby
class Order < ActiveRecord::Base
@@ -1496,7 +1496,7 @@ While Rails uses intelligent defaults that will work well in most situations, th
```ruby
class Customer < ActiveRecord::Base
- has_many :orders, dependent: :delete_all, validate: :false
+ has_many :orders, dependent: :delete_all, validate: false
end
```
diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md
index 7cce9c72cb..fe01088b2e 100644
--- a/guides/source/getting_started.md
+++ b/guides/source/getting_started.md
@@ -321,9 +321,9 @@ root 'welcome#index'
application to the welcome controller's index action and `get 'welcome/index'`
tells Rails to map requests to <http://localhost:3000/welcome/index> to the
welcome controller's index action. This was created earlier when you ran the
-controller generator (`rails generate controller welcome index`).
+controller generator (`bin/rails generate controller welcome index`).
-Launch the web server again if you stopped it to generate the controller (`rails
+Launch the web server again if you stopped it to generate the controller (`bin/rails
server`) and navigate to <http://localhost:3000> in your browser. You'll see the
"Hello, Rails!" message you put into `app/views/welcome/index.html.erb`,
indicating that this new route is indeed going to `WelcomeController`'s `index`
@@ -356,7 +356,7 @@ Rails.application.routes.draw do
end
```
-If you run `rake routes`, you'll see that it has defined routes for all the
+If you run `bin/rake routes`, you'll see that it has defined routes for all the
standard RESTful actions. The meaning of the prefix column (and other columns)
will be seen later, but for now notice that Rails has inferred the
singular form `article` and makes meaningful use of the distinction.
@@ -556,7 +556,7 @@ this:
In this example, the `articles_path` helper is passed to the `:url` option.
To see what Rails will do with this, we look back at the output of
-`rake routes`:
+`bin/rake routes`:
```bash
$ bin/rake routes
@@ -666,7 +666,7 @@ models, as that will be done automatically by Active Record.
### Running a Migration
-As we've just seen, `rails generate model` created a _database migration_ file
+As we've just seen, `bin/rails generate model` created a _database migration_ file
inside the `db/migrate` directory. Migrations are Ruby classes that are
designed to make it simple to create and modify database tables. Rails uses
rake commands to run migrations, and it's possible to undo a migration after
@@ -719,7 +719,7 @@ NOTE. Because you're working in the development environment by default, this
command will apply to the database defined in the `development` section of your
`config/database.yml` file. If you would like to execute migrations in another
environment, for instance in production, you must explicitly pass it when
-invoking the command: `rake db:migrate RAILS_ENV=production`.
+invoking the command: `bin/rake db:migrate RAILS_ENV=production`.
### Saving data in the controller
@@ -806,7 +806,7 @@ If you submit the form again now, Rails will complain about not finding the
`show` action. That's not very useful though, so let's add the `show` action
before proceeding.
-As we have seen in the output of `rake routes`, the route for `show` action is
+As we have seen in the output of `bin/rake routes`, the route for `show` action is
as follows:
```
@@ -868,7 +868,7 @@ Visit <http://localhost:3000/articles/new> and give it a try!
### Listing all articles
We still need a way to list all our articles, so let's do that.
-The route for this as per output of `rake routes` is:
+The route for this as per output of `bin/rake routes` is:
```
articles GET /articles(.:format) articles#index
@@ -1363,7 +1363,7 @@ Then do the same for the `app/views/articles/edit.html.erb` view:
We're now ready to cover the "D" part of CRUD, deleting articles from the
database. Following the REST convention, the route for
-deleting articles as per output of `rake routes` is:
+deleting articles as per output of `bin/rake routes` is:
```ruby
DELETE /articles/:id(.:format) articles#destroy