this used to work for me. i started re-writing my little app and now
it doesn’t work.
here’s my models:
class Company < ActiveRecord::Base
class Person < ActiveRecord::Base
belongs_to :Company, :counter_cache => true
then i go into my console and say:
c = Company.find(:first)
and its all like “waaaaaaH”
NoMethodError: undefined method
increment_counter' for #<Company: 0x259e3b0> from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/ lib/active_record/base.rb:1792:inmethod_missing’
if i type:
Company.inc and then hit tab, .increment_counter shows up.
i do have a people_count column in my company table