I have two models:
-created_by (links to user id)
belongs_to :user, :class_name => ‘User’, :foreign_key => ‘created_by’,
:counter_cache => true
has_many :items, :foreign_key => ‘created_by’
is this all i need to have it increment the User.items_count field
everytime a new item is created? I’m not getting any error messages but
it’s not updating the field.
can someone shed some light?