Archive for November, 2008

Facebox for Lowpro

Nov 09, 2008 in Javascript, Web Development

I really like both jQuery and Facebox but sometimes I do need to work with Prototype.

I found a couple of conversions of Facebox for Prototype. After finding these it didn’t take too much work to convert it to Lowpro.

The usage is simple:

Event.addBehavior({
  'a#fbox' : Facebox
});

The code can be found on GitHub.

Squish the slug the Rails way

Nov 06, 2008 in Ruby, Web Development

Recently Pat wrote about writing a quick method for making URL slugs. In the spirit of sharing I thought I’d mention a strategy I use in a number of the Rails apps I work on:

Take this code put it in a file named inflectors.rb in your config/initializers directory, and you’re good to go.

Tags: , , , ,