Skip to content

Commit

Permalink
Merge pull request rails#51635 from silva96/patch-2
Browse files Browse the repository at this point in the history
Improve migration.rb documentation consistency [ci skip]

* Reference the method name as it in the code
* Replace version for number everywhere to avoid confusion
  • Loading branch information
carlosantoniodasilva committed Apr 23, 2024
2 parents 0927af9 + bcb6822 commit ab49c0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/lib/rails/generators/migration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Rails
module Generators
# Holds common methods for migrations. It assumes that migrations have the
# [0-9]*_name format and can be used by other frameworks (like Sequel)
# just by implementing the next migration version method.
# just by implementing the +next_migration_number+ method.
module Migration
extend ActiveSupport::Concern
attr_reader :migration_number, :migration_file_name, :migration_class_name
Expand Down Expand Up @@ -46,10 +46,10 @@ def set_migration_assigns!(destination)
end

# Creates a migration template at the given destination. The difference
# to the default template method is that the migration version is appended
# to the default template method is that the migration number is prepended
# to the destination file name.
#
# The migration version, migration file name, migration class name are
# The migration number, migration file name, migration class name are
# available as instance variables in the template to be rendered.
#
# migration_template "migration.rb", "db/migrate/add_foo_to_bar.rb"
Expand Down

0 comments on commit ab49c0a

Please sign in to comment.