Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Add magic encoding comment to generated files

#413

Scenario: Comment is a polymorphic model. So products, blogs, games all has_many :comments.

If I want to add a counter_cache option, I gotta add a comments_count row to each one of the different things that a comment can belong to. In my app, that's 10 or so different models.

It might be useful to store the counter_cache information in memcached.

Perhaps the syntax:

class Comment
  belongs_to :comment_of, :polymorphic => true, :counter_cache => true, :storage => :memcached

  # or, storage option could default to db
  belongs_to :comment_of, :polymorphic => true, :counter_cache => true, :storage => :db 
end

Reported by Joe Van Dyk · June 13th, 2008 @ 09:25 PM

State: wontfix
Milestone: none
Assigned to: Jeremy Kemper Jeremy Kemper
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to wontfix
    • Tag set to activerecord

    Plugin please.

    Thanks.

    July 23rd, 2008 @ 01:59 PM

  2. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 9th, 2010 @ 10:12 PM

  3. Jeff Kreeftmeijer
  4. Jeff Kreeftmeijer
  5. Jeff Kreeftmeijer
  6. bingbing
  7. bingbing