aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/aircraft.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix counter_cache for polymorphic associationsStefan Kanev2015-07-191-0/+1
| | | | | | | | | | | | | | Also removes a false positive test that depends on the fixed bug: At this time, counter_cache does not work with polymorphic relationships (which is a bug). The test was added to make sure that no StaleObjectError is raised when the car is destroyed. No such error is currently raised because the lock version is not incremented by appending a wheel to the car. Furthermore, `assert_difference` succeeds because `car.wheels.count` does not check the counter cache, but the collection size. The test will fail if it is replaced with `car.wheels_count || 0`.
* Refactoring test_has_many_with_pluralize_table_names_false testGuillermo Iguaran2011-05-201-0/+1
|
* Fixing has_many association when ActiveRecord::Base.pluralize_table_names is ↵Guillermo Iguaran2011-05-151-0/+3
false. fixes #557