ActionView rcsv template handler

Posted by Trey Thu, 31 Jul 2008 15:07:00 GMT

The way the rjs and builder template handlers work in rails is nice. I do a lot of work with csv for generating reports, and having all the csv generation code in the controller doesn't seem to fit the MVC paradigm. I dug in to how ActionView template handlers work in Rails 2.1 and came up with the following solution.

RJS Errors with Firebug Goodness

Posted by Trey Fri, 18 Jul 2008 19:02:00 GMT

I use firebug for all of my javascript debugging. It’s an excellent application, but one thing that has always bothered me is that rail’s built-in RJS exception handler shows it’s output in an alert. Firebug has the very handy console.log() function. Why can’t rails use that?

Now it can.

Adding hooks to class

Posted by Bougyman Tue, 15 Jul 2008 16:28:00 GMT

Ugly way to create a hook for your class which wraps any method you create in any filters you wish to add. In this case simply states the new and old method names.