responds_to?(:chris)

Chris Cherry's random snippets of geek 

rattl - TAL for Ruby

There's already too many templating solutions for every language, Ruby included. Erb, Liquid, Haml, etc.

However, I didn't find an abundance of good TAL-like templating languages. For those of you who don't know much about TAL, check out a short tutorial on it. It's a pretty interesting way to do templating if you have a lot of interaction with non-technical designers and such.

Anyway, I'm starting the Ruby ATribute Templating Language (Rattl). Mainly because it's just fun to create new templating languages! A few of the basic constructs are implemented so far, so its kinda-sorta useful. Check it out, Contributions are welcome as always!

http://github.com/ctcherry/rattl

Comments [0]

urlize Plugin

New rails plugin that I have been using in production code for a while was just posted to GitHub. It reformats any string into a permalink style that is suitable for use in a URL. For example...


"Page Test #1".urlize
>> "page-test-1"

Git it here:
http://github.com/ctcherry/urlize

I'm sure there is stuff wrong with it, so patches and pull requests are always welcome!

Comments [0]

route_append Plugin

I pushed a new plugin to github today. I've been using for a while to test controllers in Rails that are only inherited from, and don't have their own routes. (That's an AbstractController, like ApplicationController). It's called route_append. It's pretty basic but it helps anyway.

Here's the code:

http://github.com/ctcherry/route_append

Comments [0]

validates_numericality_of patch

Update 7/9/08: Patch was accepted!

I just submitted a patch to Rails, it adds Infinity support to validates_numericality_of. Check it out, feedback is welcome.

http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/354-allow-infinity-to-pass-validates_numericality_of

Comments [0]

Git on the bandwagon

So Im on board with git, great features, fast, what's not to like? To show my commitment I switched my lonely plugin over from SVN to github. Drop in check out my profile, and "follow" me if you like what you see.

Comments [0]

ModalBox Confirm plugin

ModalBox is an awesome modal dialog library based on prototype and script.aculo.us. It's simple, featureful, small (24KB, uncompressed), and easy to use. I was adding some style-frosting to a new application recently and I thought it would be great to have the Rails link_to helper use ModalBox automatically for ":confirm" messages. Hours later, this plugin was born. I know I'm going to get alot of use out of it, so I figure some of you will as well. Heres the repository:

http://github.com/ctcherry/modalbox_confirm

Comments [5]

def initialize

My name is Chris Cherry. I'm a Web Applications Developer at Einstein Industries, where I work primarily with Ruby on Rails. I'll be using this blog to share Ruby on Rails plugins, tips, tricks, rants, general web development, and of course just some random geeky stuff every now and then.

I should have my first plugin posted very soon, so stop by every now and then to check in or subscribe to my RSS feed so you don't have to!

Comments [0]