Ruby on Rails Wednesday, September 1, 2010

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.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment