Permalink
Browse files

Remove block definition from method, is not needed since yield is use…

…d inside.
  • Loading branch information...
1 parent d9f199e commit 4086ecea24446904bac4c69812f219ce7cbfbbba @miloops miloops committed Jun 24, 2010
@@ -107,7 +107,7 @@ def quote_table_name(name)
# REFERENTIAL INTEGRITY ====================================
# Override to turn off referential integrity while executing <tt>&block</tt>.
- def disable_referential_integrity(&block)
+ def disable_referential_integrity
yield
end
@@ -219,7 +219,7 @@ def quoted_false
# REFERENTIAL INTEGRITY ====================================
- def disable_referential_integrity(&block) #:nodoc:
+ def disable_referential_integrity #:nodoc:
old = select_value("SELECT @@FOREIGN_KEY_CHECKS")
begin
@@ -372,7 +372,7 @@ def supports_disable_referential_integrity?() #:nodoc:
return false
end
- def disable_referential_integrity(&block) #:nodoc:
+ def disable_referential_integrity #:nodoc:
if supports_disable_referential_integrity?() then
execute(tables.collect { |name| "ALTER TABLE #{quote_table_name(name)} DISABLE TRIGGER ALL" }.join(";"))
end

0 comments on commit 4086ece

Please sign in to comment.