mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
3 changed files with 7 additions and 7 deletions
|
@ -243,7 +243,7 @@ module ActiveRecord
|
|||
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 @@ class TestAutosaveAssociationOnAHasAndBelongsToManyAssociation < ActiveRecord::T
|
|||
include AutosaveAssociationOnACollectionAssociationTests
|
||||
end
|
||||
|
||||
class TestAutosaveAssociationValidationsOnAHasManyAssocication < ActiveRecord::TestCase
|
||||
class TestAutosaveAssociationValidationsOnAHasManyAssociation < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
|
@ -1165,7 +1165,7 @@ class TestAutosaveAssociationValidationsOnAHasManyAssocication < ActiveRecord::T
|
|||
end
|
||||
end
|
||||
|
||||
class TestAutosaveAssociationValidationsOnAHasOneAssocication < ActiveRecord::TestCase
|
||||
class TestAutosaveAssociationValidationsOnAHasOneAssociation < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
|
@ -1186,7 +1186,7 @@ class TestAutosaveAssociationValidationsOnAHasOneAssocication < ActiveRecord::Te
|
|||
end
|
||||
end
|
||||
|
||||
class TestAutosaveAssociationValidationsOnABelongsToAssocication < ActiveRecord::TestCase
|
||||
class TestAutosaveAssociationValidationsOnABelongsToAssociation < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
|
@ -1206,7 +1206,7 @@ class TestAutosaveAssociationValidationsOnABelongsToAssocication < ActiveRecord:
|
|||
end
|
||||
end
|
||||
|
||||
class TestAutosaveAssociationValidationsOnAHABTMAssocication < ActiveRecord::TestCase
|
||||
class TestAutosaveAssociationValidationsOnAHABTMAssociation < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
|
|
|
@ -734,7 +734,7 @@ class TestNestedAttributesWithNonStandardPrimaryKeys < ActiveRecord::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
class TestHasOneAutosaveAssoictaionWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
|
||||
class TestHasOneAutosaveAssociationWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
|
@ -774,7 +774,7 @@ class TestHasOneAutosaveAssoictaionWhichItselfHasAutosaveAssociations < ActiveRe
|
|||
end
|
||||
end
|
||||
|
||||
class TestHasManyAutosaveAssoictaionWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
|
||||
class TestHasManyAutosaveAssociationWhichItselfHasAutosaveAssociations < ActiveRecord::TestCase
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
|
|
Loading…
Reference in a new issue