1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/personal_legacy_thing.rb
Akira Matsuda da2f61947d Dynamically modified schema and association would not be correctly reset
This fixes <"SQLite3::SQLException: no such column: legacy_things.person_id: SELECT \"legacy_things\".* FROM \"legacy_things\" WHERE \"legacy_things\".\"person_id\" = ?">
in OptimisticLockingTest#test_lock_destroy
2014-09-06 23:28:18 +09:00

4 lines
129 B
Ruby

class PersonalLegacyThing < ActiveRecord::Base
self.locking_column = :version
belongs_to :person, :counter_cache => true
end