Permalink
Browse files

Quell warnings. Closes #5245.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent b09d02c commit 97f4a5aa14fa4890b734fd1574fad87e240c0823 @jeremy jeremy committed Jun 1, 2006
Showing with 4 additions and 3 deletions.
  1. +4 −3 activerecord/lib/active_record/fixtures.rb
@@ -490,12 +490,13 @@ def self.setup_fixture_accessors(table_names=nil)
end
def self.uses_transaction(*methods)
- @uses_transaction ||= []
- @uses_transaction.concat methods.map { |m| m.to_s }
+ @uses_transaction = [] unless defined?(@uses_transaction)
+ @uses_transaction.concat methods.map(&:to_s)
end
def self.uses_transaction?(method)
- @uses_transaction && @uses_transaction.include?(method.to_s)
+ @uses_transaction = [] unless defined?(@uses_transaction)
+ @uses_transaction.include?(method.to_s)
end
def use_transactional_fixtures?

0 comments on commit 97f4a5a

Please sign in to comment.