This project is archived and is in readonly mode.
create_table cannot be called without block
-
Pratik
- Tag changed from 2.3-rc2, activerecord, bug, patch to 2.3, 2.3-rc2, activerecord, bug, patch
- State changed from new to resolved
Fixed in eb30e4ca40370b416566f1bbaf0204bb379883e4
-
Repository
(from [eb30e4ca40370b416566f1bbaf0204bb379883e4]) Fixed a bug where create_table could not be called without a block [#2221 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/eb30e4ca40370b416566f1bbaf0204... -
Repository
(from [f2dda7b93c38a7fe5fc04930112e85a311b260e2]) Fixed a bug where create_table could not be called without a block [#2221 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/f2dda7b93c38a7fe5fc04930112e85... -
Rob Aldred
This bug is still present in AR 2.3.2
ActiveRecord::Base.connection.create_table(:foo) LocalJumpError: no block given
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:104:in `create_table' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/mysql_adapter.rb:473:in `create_table' from (irb):9</code>
-
Pratik
It's fixed in 2-3-stable branch. You can use that branch or wait for 2.3.3 to come out.
-
Rob Aldred
That's great, thanks
-
Craig Buchek
- Tag changed from 2.3, 2.3-rc2, activerecord, bug, patch to 2.3, 2.3-rc2, 2.3-stable, activerecord, bug, patch
Hey, this commit never made it into 2.3.3, 2.3.4, 2.3.5, or even 2.3-stable! How the heck did that happen?
See line 104 in http://github.com/rails/rails/blame/v2.3.5/activerecord/lib/active_... or http://github.com/rails/rails/blob/2-3-stable/activerecord/lib/acti...
It'd be nice to have this in Rails 2.3.6 (will there be a 2.3.6 release?), but we can just work around it by adding an empty block.
But it's a bit scary to see that there's a broken process somewhere, where this commit went missing for 3 releases, and still isn't in 2.3-stable. Good to see that it is included in v3.0.0.beta1 and master at least.
-
Repository
(from [ea6ef768a7718f9b4733c7db5b0a49d57440a2d9]) Fixed a bug where create_table could not be called without a block [#2221 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/ea6ef768a7718f9b4733c7db5b0a49...
