From c0af95e0abe92ea676bf73959ea84d2fccc8c8fb Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sun, 6 Dec 2015 06:29:19 +1030 Subject: Use a deliberately-invalid migration version in all doc examples If we use a real version, at best that'll be an onerous update required for each release; at worst, it will encourage users to write new migrations against an older version than they're using. The other option would be to leave these bare, without any version specifier. But as that's just a variant spelling of "4.2", it would seem to raise the same concerns as above. --- guides/source/getting_started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/getting_started.md') diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 5700e71103..6cf43f496b 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -679,7 +679,7 @@ If you look in the `db/migrate/YYYYMMDDHHMMSS_create_articles.rb` file (remember, yours will have a slightly different name), here's what you'll find: ```ruby -class CreateArticles < ActiveRecord::Migration +class CreateArticles < ActiveRecord::Migration[0.0] def change create_table :articles do |t| t.string :title @@ -1542,7 +1542,7 @@ In addition to the model, Rails has also made a migration to create the corresponding database table: ```ruby -class CreateComments < ActiveRecord::Migration +class CreateComments < ActiveRecord::Migration[0.0] def change create_table :comments do |t| t.string :commenter -- cgit v1.2.3 From 97c77160cd4c8b32a6572adefa268eb91162e3e1 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Tue, 15 Dec 2015 17:10:40 +1030 Subject: Use a real migration version number in docs Even though this means more things to change when we bump after a release, it's more important that our examples are directly copyable. --- guides/source/getting_started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides/source/getting_started.md') diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 6cf43f496b..1416d00de5 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -679,7 +679,7 @@ If you look in the `db/migrate/YYYYMMDDHHMMSS_create_articles.rb` file (remember, yours will have a slightly different name), here's what you'll find: ```ruby -class CreateArticles < ActiveRecord::Migration[0.0] +class CreateArticles < ActiveRecord::Migration[5.0] def change create_table :articles do |t| t.string :title @@ -1542,7 +1542,7 @@ In addition to the model, Rails has also made a migration to create the corresponding database table: ```ruby -class CreateComments < ActiveRecord::Migration[0.0] +class CreateComments < ActiveRecord::Migration[5.0] def change create_table :comments do |t| t.string :commenter -- cgit v1.2.3