Fixing test class names and refactor line in autosave association
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
3f1cdb85b8
commit
7eedc3f397
@ -243,7 +243,7 @@ def nested_records_changed_for_autosave?
|
||||
if [:belongs_to, :has_one].include?(reflection.macro)
|
||||
return true if association.target && association.target.changed_for_autosave?
|
||||
else
|
||||
association.target.each {|record| return true if record.changed_for_autosave? }
|
||||
return true if association.target.detect { |record| record.changed_for_autosave? }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1149,7 +1149,7 @@ def setup
|
||||
include AutosaveAssociationOnACollectionAssociationTests
|
||||
end
|
||||
|
||||
class TestAutosaveAssociationValidationsOnAHasManyAssocication < ActiveRecord::TestCase
|
||||
class TestAutosaveAssociationValidationsOnAHasManyAssociation < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
@ -1165,7 +1165,7 @@ def setup
|
||||
end
|
||||
end
|
||||
|
||||
class TestAutosaveAssociationValidationsOnAHasOneAssocication < ActiveRecord::TestCase
|
||||
class TestAutosaveAssociationValidationsOnAHasOneAssociation < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
@ -1186,7 +1186,7 @@ def setup
|
||||
end
|
||||
end
|
||||
|
||||
class TestAutosaveAssociationValidationsOnABelongsToAssocication < ActiveRecord::TestCase
|
||||
class TestAutosaveAssociationValidationsOnABelongsToAssociation < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
@ -1206,7 +1206,7 @@ def setup
|
||||
end
|
||||
end
|
||||
|
||||
class TestAutosaveAssociationValidationsOnAHABTMAssocication < ActiveRecord::TestCase
|
||||
class TestAutosaveAssociationValidationsOnAHABTMAssociation < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
|
@ -734,7 +734,7 @@ def test_should_update_existing_records_with_non_standard_primary_key
|
||||
end
|
||||
end
|
||||
|
||||
class TestHasOneAutosaveAssoictaionWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
|
||||
class TestHasOneAutosaveAssociationWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
@ -774,7 +774,7 @@ def setup
|
||||
end
|
||||
end
|
||||
|
||||
class TestHasManyAutosaveAssoictaionWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
|
||||
class TestHasManyAutosaveAssociationWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
|
Loading…
Reference in New Issue
Block a user