Skip to content

Commit

Permalink
Fix create_versions migration to support Ruby3
Browse files Browse the repository at this point in the history
  • Loading branch information
Joey Tepperman committed Jan 18, 2022
1 parent 210f432 commit 47f81bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 47f81bc

Please sign in to comment.