Skip to content

Commit

Permalink
Merge pull request #50228 from cedriccarrard/fix-50189-docs-mismatch-…
Browse files Browse the repository at this point in the history
…between-revert-code-example-and-subsequent-steps

Adjusted an example to align with the documentation section on reversing a previous migration.
  • Loading branch information
rafaelfranca committed May 22, 2024
2 parents 486bb99 + 992dbd7 commit 6a283ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions guides/source/active_record_migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,10 @@ class DontUseDistributorsViewMigration < ActiveRecord::Migration[8.0]
def change
revert do
# copy-pasted code from ExampleMigration
create_table :distributors do |t|
t.string :zipcode
end

reversible do |direction|
direction.up do
# create a distributors view
Expand Down

0 comments on commit 6a283ac

Please sign in to comment.