Are you still having trouble implementing a custom one? Or just commenting that it would be helpful?
Why don't you write one? On Tue, Dec 8, 2009 at 2:38 PM, liquid_rails <[email protected]>wrote: > If someone could write a plugin to do custom counter-caches, that > would be Awesome. I think it would be very useful! > > On Dec 8, 10:34 am, James Miller <[email protected]> wrote: > > There's no built-in functionality for this, but you can just add > > after_create and before_destroy callbacks to increment/decrement the > parent > > records with the correct count based on any number of conditions. > > > > You can see how it's implemented in the Rails source here: > http://github.com/rails/rails/blob/master/activerecord/lib/active_rec... > > > > On Tue, Dec 8, 2009 at 10:28 AM, liquid_rails <[email protected] > >wrote: > > > > > I would like for the database to keep a count of postings belonging to > > > a specific category (can do that), that are NOT expired (don't know > > > how to do that). Are there any built-in functions to do this? > > > > > Thanks! > > > > > -- > > > SD Ruby mailing list > > > [email protected] > > >http://groups.google.com/group/sdruby > > > > > > -- > SD Ruby mailing list > [email protected] > http://groups.google.com/group/sdruby > -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
