Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci-skip][Doc] Fix inconsistency in 7-0-stable sample codes #48625

Merged
merged 1 commit into from Jul 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions guides/source/active_record_migrations.md
Expand Up @@ -73,10 +73,10 @@ to reverse, you can use `reversible`:
```ruby
class ChangeProductsPrice < ActiveRecord::Migration[7.0]
def change
reversible do |dir|
reversible do |direction|
change_table :products do |t|
dir.up { t.change :price, :string }
dir.down { t.change :price, :integer }
direction.up { t.change :price, :string }
direction.down { t.change :price, :integer }
end
end
end
Expand Down Expand Up @@ -686,7 +686,7 @@ class ExampleMigration < ActiveRecord::Migration[7.0]
FROM distributors;
SQL
end
dir.down do
direction.down do
execute <<-SQL
DROP VIEW distributors_view;
SQL
Expand Down Expand Up @@ -798,7 +798,7 @@ class DontUseDistributorsViewMigration < ActiveRecord::Migration[7.0]
FROM distributors;
SQL
end
dir.down do
direction.down do
execute <<-SQL
DROP VIEW distributors_view;
SQL
Expand Down