This project is archived and is in readonly mode.

#2221 ✓resolved
Joseph Wilk

create_table cannot be called without block

Reported by Joseph Wilk | March 12th, 2009 @ 01:26 PM | in 2.x

Testing against master and 2.3 rc-2

When create_table is called without a block it raises an error:


Person.connection.create_table(:test)

test_create_table_without_a_block(MigrationTest):
LocalJumpError: no block given
    ./test/cases/../../lib/active_record/connection_adapters/abstract/schema_statements.rb:104:in `create_table'
    ./test/cases/migration_test.rb:274:in `test_create_table_without_a_block'
    ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
    ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run'

Patch with test and fix attached.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages