Permalink
Browse files

Merge pull request #107 from virtax/master

fix error for calling 'create_table' without block
  • Loading branch information...
2 parents a72a4ab + 766ba16 commit c6c506be130509f2f852b4ca5da05dcdc1f9644a @matthuhiggins committed Apr 3, 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
- block.call(td)
+ block.call(td) unless block.nil?
end
definition.foreign_keys.each do |to_table, options_list|
options_list.each do |options|

0 comments on commit c6c506b

Please sign in to comment.