# \[ANN\] Acts as Most Popular plugin

**URL:** <https://www.ruby-forum.com/t/ann-acts-as-most-popular-plugin/101559>\
**Category:** Rails\
**Created:** [August 6, 2006, 6:28am UTC](https://www.ruby-forum.com/t/ann-acts-as-most-popular-plugin/101559 "2006-08-06T06:28:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shane\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@Shane\_V](https://www.ruby-forum.com/u/Shane_V)\
**Post date:** [August 6, 2006, 6:28am UTC](https://www.ruby-forum.com/t/ann-acts-as-most-popular-plugin/101559/1 "2006-08-06T06:28:22Z")

</div>

Make your models feel like they are in high school again. This plugin  
retrieves the most frequently occurring values for each column. It  
adds methods of the form most\_popular\_[pluralized\_column\_name]. Check  
out  
[http://shanesbrain.net/articles/2006/08/04/acts-as-most-popular-rails-plugin](http://shanesbrain.net/articles/2006/08/04/acts-as-most-popular-rails-plugin)  
for sample usage.

The plugin is mostly just a group\_by in disguise. It is probably  
overkill if you just need to find the most popular items for one  
column, and probably doesn’t warrant a plugin. But if you are a  
newbie, then this plugin will do the heavy lifting for you.

Shane V.  
[http://shanesbrain.net](http://shanesbrain.net)

---

<div class="post-metadata">

**Author:** ![Shane\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@Shane\_V](https://www.ruby-forum.com/u/Shane_V)\
**Post date:** [August 6, 2006, 7:37am UTC](https://www.ruby-forum.com/t/ann-acts-as-most-popular-plugin/101559/2 "2006-08-06T07:37:27Z")

</div>

Love the name Shane! 🙂

---

<div class="post-metadata">

**Author:** ![Shane\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@Shane\_V](https://www.ruby-forum.com/u/Shane_V)\
**Post date:** [August 6, 2006, 4:01pm UTC](https://www.ruby-forum.com/t/ann-acts-as-most-popular-plugin/101559/3 "2006-08-06T16:01:48Z")

</div>

I can’t take credit for the name. Someone on #rubyonrails came up  
with it. I couldn’t use Acts as Popular since it was already taken.  
If you are the one who came up with the name (and if you care) feel  
free to show yourself 🙂

Shane
