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

Fixes #29470 - Rails 6 compatible method calls #7561

Merged
merged 1 commit into from Apr 7, 2020

Conversation

ezr-ondrej
Copy link
Member

Moves to rails 6 syntax and adds a patch file to keep compatibility to Rails 5.2

@ezr-ondrej ezr-ondrej force-pushed the rails_6 branch 2 times, most recently from 2dcc674 to 930486f Compare April 6, 2020 10:25
Comment on lines 348 to 350
ActiveRecord::Migrator.migrations_paths, ActiveRecord::SchemaMigration).migrations
pending_migrations = ActiveRecord::Migrator.new(:up, migration_paths, ActiveRecord::SchemaMigration).
pending_migrations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need all this code? ActiveRecord::Base.connection.migration_context.needs_migration? will give the same return value afaict, we would lose the debug logging but i highly doubt it's actually useful at all

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you go:
#7571

Copy link
Member

@tbrisker tbrisker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ezr-ondrej !

@tbrisker tbrisker merged commit a2e8571 into theforeman:develop Apr 7, 2020
@ezr-ondrej ezr-ondrej deleted the rails_6 branch April 7, 2020 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants