Forum: Ruby on Rails counter column does not get updated

Posted by Mohammed Alenazi (Guest)
on 2010-09-02 02:38
(Received via mailing list)
Hi

I have
In user.rb
has_many :properties ,:dependent => :destroy

In property.rb
belongs_to :user ,:counter_cache => true


inside property migration
 add_column :users, :properties_count, :integer, :default => 0


for some reason the counter column does not get updated.

I am using resful auth. I am not sure if it's causing the problem.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.