Skip to content

Commit 0eed48c

Browse files
princejosephclaude
andcommitted
Fix create_table kwargs for Ruby 3 / Rails 7 compatibility
`create_table(force: :cascade)` was passing the options hash as a positional argument via *args, which Ruby 3 no longer allows. Switch to **kwargs so the hash is forwarded as keyword arguments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cfff539 commit 0eed48c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • ruby/hyper-operation/lib/hyper-operation/transport/connection_adapter/active_record

ruby/hyper-operation/lib/hyper-operation/transport/connection_adapter/active_record/auto_create.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def needs_init?
1717
Hyperstack.transport != :none && Hyperstack.on_server? && !table_exists?
1818
end
1919

20-
def create_table(*args, &block)
21-
connection.create_table(table_name, *args, &block) if needs_init?
20+
def create_table(**kwargs, &block)
21+
connection.create_table(table_name, **kwargs, &block) if needs_init?
2222
end
2323
end
2424
end

0 commit comments

Comments
 (0)