mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Remove block definition from method, is not needed since yield is used inside.
This commit is contained in:
@@ -107,7 +107,7 @@ module ActiveRecord
|
||||
# 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 @@ module ActiveRecord
|
||||
|
||||
# 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 @@ module ActiveRecord
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user