Hi everyone, Does anyone know if it''s possible/supported to have an object with two counter caches? I have an object that''s defined like this: class Bookmark < ActiveRecord::Base belongs_to :user, :counter_cache=>true belongs_to :gift, :counter_cache=>true ... And I''m trying to figure out the syntax I can use which, when I create a bookmark, will update both counter caches. Right now I''m doing this: agift.bookmarks.create(:user_id=>self.id) And I''m seeing that it updates the user counter cache (users.bookmarks_count) but it isn''t updating the gift counter cache (gifts.bookmarks_count). Has anyone done this before, or does anyone know a good way I can get this to work? Thanks! Tom -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---