views:

45

answers:

3

I looked into this plugin called acts_as_permalinkable at github and found it to be useful. Do you know of any other plugin that generates search engine friendly urls for ruby on rails models in a better way?

A: 

acts_as_urlnameable does the trick as well. I haven't used permalinkable, so I can't say that it is better. Does it have some specific deficiencies that concern you?

It lives at: http://code.helicoid.net/svn/rails/plugins/acts_as_urlnameable/

Adam Crossland
+2  A: 

friendly_id might do the trick for you.

nowk
I second the use of friendly_id - http://github.com/norman/friendly_id
bensie
A: 

there is always just to_params in your model which can display basically whatever you want. Just note that your methods in that model will have to change, when you use find.

e.g. in the post.rb file

def to_param
  name.parameterize
end

and in your posts_controller.rb methods that usually pick up the params[:id] call, you just have to change them to:

@post = Post.find_by_name(params[:id])

no plugin, no fuss and still pretty urls.

pjammer