The first one is an insane way to do queries in Rails. Never interpolate strings directly in SQL statements, it's a huge security hole!
Nice to know about the third option
I would definitely miss this if I wouldn't use CoffeeScript. It doesn't even use eval, which can be potentially dangerous.
I love the simplicty with which CoffeeScript takes care of that for me
Actually the minified version is DRY and not very hard to read. It applies the properties on the parent element (<g>) so the child elements just get coordinates, and don't need to specify stroke color & width for each element. It's like writing DRYer css & html.
Am I the only one who noticed the "horseporn" easter egg? :))
Interesting technique. I was using Coffeescript to create inheritance. How are you handling super calls from the child object method (not constructor)? What other aspects are different than Coffeescript's implementation?
Thanks for the uptimerobot tip :) Saved me from quite a hassle with trying to set up a curl command in a crontab using dotcloud. For some reason that didn't work.
Or you could do this like
That way you could also have other attributes besides the class