Skip to content

Commit ab49c0a

Browse files
Merge pull request rails#51635 from silva96/patch-2
Improve migration.rb documentation consistency [ci skip] * Reference the method name as it in the code * Replace version for number everywhere to avoid confusion
2 parents 0927af9 + bcb6822 commit ab49c0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

railties/lib/rails/generators/migration.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Rails
77
module Generators
88
# Holds common methods for migrations. It assumes that migrations have the
99
# [0-9]*_name format and can be used by other frameworks (like Sequel)
10-
# just by implementing the next migration version method.
10+
# just by implementing the +next_migration_number+ method.
1111
module Migration
1212
extend ActiveSupport::Concern
1313
attr_reader :migration_number, :migration_file_name, :migration_class_name
@@ -46,10 +46,10 @@ def set_migration_assigns!(destination)
4646
end
4747

4848
# Creates a migration template at the given destination. The difference
49-
# to the default template method is that the migration version is appended
49+
# to the default template method is that the migration number is prepended
5050
# to the destination file name.
5151
#
52-
# The migration version, migration file name, migration class name are
52+
# The migration number, migration file name, migration class name are
5353
# available as instance variables in the template to be rendered.
5454
#
5555
# migration_template "migration.rb", "db/migrate/add_foo_to_bar.rb"

0 commit comments

Comments
 (0)