ActionController::MimeResponds is brilliant

Was a little bit blown away yesterday, by how smart the ActionController::MimeResponds module in Rails ActionPack really is. For the longest time when using respond_with (the younger sibling of respond_to,) I’ve been doing it wrong.

Continue reading →

Really simple and naïve Ruby plugin framework

I recently found myself writing some Ruby (IronRuby to be specific) at work for Umbraco that needed to generate HTML for different types of content, destined to be displayed in an aside column. There are many ways of doing something like this, but in order to not violate the Open/Closed Principle, I decided to create a very simple and naïve plugin framework that would automagically wire up new content-type handlers. The way I chose to implement this, was to leverage the meta-programming capabilities in Ruby, more specifically the inherited hook.

Continue reading →

Why I love Ruby

I’ve been a fan of the Ruby language since I was first introduced to Ruby on Rails back in 2005. While I was learning both Rails and Ruby, it quickly became apparent that all the awesome-ness of the former would never have been possible without the latter; what makes Rails great is Ruby, and Ruby would almost certainly still be an obscure and under-appreciated language had it not been for Rails. Ruby is a remarkably beautiful language, and I love working with it.

Continue reading →

Archive

Looking for archived posts?