Howdy, I’m Scott Fleckenstein, Code monkey for Satisfaction. I’ve got a couple of things to talk about in this post, so let me begin by introducing you to a bit about Satisfaction’s attitude when it comes to making software. It can be easily summarized as “Standing on the shoulders of giants”; we recognize that our skills in making software owe a lot to DHH, Matz, _why, and oh so many others. Because of these people and the beauty of open source software I am a much better developer than I could have wished for.
I’m very glad and proud to work for a company that embraces open source, and realizes that there is business value in contributing to the open source community and spirit. In the past they have given me a pretty long leash to play with, letting me develop things like voo2do2ical, railmail, and exceptional. I am looking forward to creating plugins and snippets out of the interesting pieces of code that spring forth while developing Satisfaction.
That brings me to my next point: Erber. This will be Satisfaction’s first among many contributions back to the community, a plugin for ruby on rails that makes it trivially easy to register additional file extensions for rendering in the same manner as rhtml. In my case, I wanted to be able to render javascript files in the same manner as I do html (with rhtml), and css (with css_dryer). More on this in a coming post.
Anyways, the following is an example of how to register an extension with Erber:
Erber.register :njs, :rrtf, :rpls
just include the above in your environment file and at that point, you create templates that end in .njs, .rrtf, and .rpls. Pretty simple, really. The code is up on google project hosting at http://code.google.com/p/erber/, and you can install the plugin with the following command:
script/plugin install http://erber.googlecode.com/svn/trunk/
Well I’m off. I’ll be in touch in the future.
One Comment
Valid email address required for posting
Great post, great plugin.
And by the way, if you’re a Code monkey then you’re the silverback gorilla of code monkeys.