Friday, April 17, 2009

Vim Setup

I've posted many a setup in vim before, but I've decided to put it on github for easier management.

Wednesday, April 1, 2009

Stars and acts_as_rateable

I recently wanted to implement a star system in Rails. I looked at this rateable plugin and followed this tutorial to create the stars.

It wasn't as cut and dried as I had hoped, so here is the code I used. It's pretty complete. Disclaimer: I used haml and sass and if you don't, you should still be able to understand the code. In case you don't use sass, here's the generated CSS that you get from the sass file.