Browse files

fix AbstractAdapter.create_table when a block isn't provided

create_table can be used for creating table without columns. 
For example, this is used in the mini_record gem.
  • Loading branch information...
1 parent a72a4ab commit 766ba16c3d6aa4e9ce76d07d068c916643124494 Dmitriy Partsyrniy committed Mar 29, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/foreigner/connection_adapters/abstract/schema_statements.rb
@@ -13,7 +13,7 @@ def create_table(table_name, *args, &block)
definition = nil
super do |td|
definition = td # This is my trick to get the definition
+ unless block.nil?
definition.foreign_keys.each do |to_table, options_list|
options_list.each do |options|

1 comment on commit 766ba16


virtax commented on 766ba16 Apr 17, 2013

I have installed the 1.4.1 gem version and can't find my fix in the gem sources.
Maybe something wrong with gem buidling? Can you please check it?

Please sign in to comment.