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

Fix create_versions migration to support Ruby3 #1366

Merged
merged 2 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/generators/paper_trail/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def create_migration_file
# See /~https://github.com/paper-trail-gem/paper_trail/issues/651
def item_type_options
if mysql?
", { null: false, limit: 191 }"
", null: false, limit: 191"
else
", { null: false }"
", null: false"
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/generators/paper_trail/install_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
}.call
expected_item_type_options = lambda {
if described_class::MYSQL_ADAPTERS.include?(ActiveRecord::Base.connection.class.name)
", { null: false, limit: 191 }"
", null: false, limit: 191"
else
", { null: false }"
", null: false"
end
}.call
expect(destination_root).to(
Expand Down