Posts from August 2009

find_by_param for permalinks

A nice, clear, declarative means of doing something I’ve been writing code to do for years … find_by_param
From the README:

Find_by_param helps you dealing with permalinks and finding objects by our permalink value
class Post < ActiveRecord:Base
  make_permalink :with => :title
end
now you can do Post.find_by_param(…)
If you have a permalink-column find_by_param saves the permalink there and uses that otherwise it [...]


Handling ajax-y file uploads

I’m working on a site for a client where a user needs to upload a logo for their newly created widget.  The client wants the logo to be visible during the widget creation process (so the user can make sure the logo they’re uploading is correct).  A user can add multiple widgets all at the [...]