<%= link_to (@formobject.title.empty? ? "edit" : @formobject.title),
eval("#{@formobject.class.to_s.downcase}_path(@formobject)") %>
This, in a shared partial, lets one edit articles (with or without existing titles) of different types (ActiveRecord Single table inheritance). @formobject is the object type; each object has a corresponding controller.
effective date: 2009-12-07 23:18:40 UTC