This project is archived and is in readonly mode.
Add magic encoding comment to generated files
Reported by Joe Van Dyk | June 13th, 2008 @ 09:25 PM
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
Comments and changes to this ticket
-
Pratik July 23rd, 2008 @ 01:59 PM
- State changed from new to wontfix
- Tag set to activerecord
Plugin please.
Thanks.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>