Wednesday, April 16, 2008

Getting Radiant and Exception Notifier to play nice together

I recently had a need to install the Exception Notifier plugin in Radiant.  I used this excellent post from Casper Fabricus to get it working with Radiant, but I wanted to have it included in every controller, even the Radiant ones, not just the ones in our various extensions.

Since Radiant is a gem, you don't have direct access to it's application controller to be able to add the includes.  It took me a little while to figure this out, but I finally hit on adding these lines to the bottom of the library file that Casper creates in his article:

class ActionController::Base
  include ExceptionNotifiable
  alias :rescue_action_locally :rescue_action_in_public
end

This causes Exception Notifier to be available for all controllers, even Radiants'.

Tuesday, January 29, 2008

Enough with the ninjas!

Hey Rails community. Can you stop using the term "ninja"? The first four million times it was used in job posts, About Us links, and blog articles were hilarious and felt fresh as a baby's bottom. But now, its starting to get a little old.

I think that before someone is allowed to use this word, they have to fulfill the following requirements:

1. Wear black pajamas in public for an entire year.
2. Assassinate a head-of-state.
3. Code an entire Rails app while holding a pair of nunchucks.