Links
Permalink Fu
Categories
Permalink Fu
This is a simple plugin extracted from Mephisto for creating permalinks from attributes.
class Article < ActiveRecord::Base
has_permalink :title
end
This will escape the title, making it fit to use in a URL in the after_validation callback.
Use PermalinkFu.escape to escape a string manually if you like.
Vitals
| Repository | http://svn.techno-weenie.net/projects/plugins/permalink_fu/ |
|---|---|
| License | Rails' (MIT) |
| Tags |
permalink slug
|
| Rating | (20 votes) |
| Owner | Rick Olson |
| Created | 19 February 2007 |
Comments
-
This is a very concise plugin with little-to-no documentation. It'll get the job done, but you're flying blind for the most part.
-
I wasn't able to update all the existing objects I had, after adding the plugin. I had to change a line in permalink_fu.rb in order to fix an invalid SQL condition that was sent to the DB. Something like : "WHERE (permalink='', 'permalink-title-value' AND ID!=1)
Line 74
#base = send("#{self.class.permalink_field}=", send(self.class.permalink_field)[0..limit - 1]) base = send(self.class.permalink_field)[0..limit - 1]I also used the howto tutorial for this plugin written by Eadz here : http://www.seoonrails.com/even-better-looking-urls-with-permalink_fu
-
ConversionBay provides world-class end-to-end BPO solutions using an optimum mix of onsite, offsite, and offshore services to deliver the best value to our clients.
-
Most of the plugins including this one assumes that everyone knows everything. So they contain very little or no information. For example, permalink_fu does not have instructions on how to use it for an existing project (where records already exist). very disappointing.

