Tuesday, July 27, 2010

[Rails] Re: Problem with named_scope using a count

pepe wrote:
> Maybe adding 2 integer columns to your Posts table to count the hits?
>
> When somebody rates the Post you just add 1 to whichever column you
> need. Then it would be a simple matter of sorting your posts in
> ascending/descending sequence by the column you want to work with.
>
> I would add indexes by the columns to make it work faster.

Good idea
--
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@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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate