Last week, while developing a feature I had some code like this in a view: link_to_unless @post.url.blank?, “Link to post”, @post.url Where url is an attribute of type String. As people usually don’t like negative conditionals, we can easily rewrite this code as: link_to_if @post.url.present?, “Link to post”, @post.url However, we can clean our code … »

This blog post is about our Hacking Evenings, a weekly session in which we gather our team and do something to improve our knowledge. We have recently talked about it on Ruby Conf Brazil and Ruby Conf Uruguay as well!