Monthly Archives: October 2012

Short and clean ruby (or an exercise in group-think)

In some part of my code I ended writing the following: where self is some ActiveRecord model, and count_processed is an attribute of that model (and stored in the database). What am i trying to achieve (if it is not blatantly obvious): if count_processed is not initialised, make it zero increment count_processed Imho this code […]

how to remove deprecation warnings for link_to_function

Since rails 3.2.4 the link_to_function is effectively deprecated (again). Everything keeps on working, but when running my specs I got a horseload of deprecation warnings. I know the optimal/recommended way is to use unobtrusive javascript, but the quickest way to fix this is really easy. Just perform the following translation: Dead-easy :) In the next […]