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/engine.rb
Neeraj Singh 1e53404fe9 reset_counter should work with non-traditional belongs_to and polymorphic belongs_to
[#4984 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-08 23:24:12 +02:00

3 lines
142 B
Ruby

class Engine < ActiveRecord::Base
belongs_to :my_car, :class_name => 'Car', :foreign_key => 'car_id', :counter_cache => :engines_count
end