Fancy_string is a project mainly written in Ruby, based on the MIT license.
Simple convert from "My favorite café" to "my-favorite-cafe". Removes diacritics. Useful for SEO url.
You can simple convert from "My favorite café" to "my-favorite-cafe"
SEO url? Yes. You can get url like "/articles/1/my-first-article" instead of "/articles/1"
Fancy_string extends standard String class.
str = "My COOL fancy string" str.fancy
We have an article controller.
Add this route, to allow additional parameter *fancy
map.article 'article/:id/*fancy', :controller => 'article', :action => 'show'
Then use link_to helper like this:
@article = Article.find(params[:id])
<%= link_to @article.title, article_path(@article, @article.title.fancy)
My first article
Copyright (c) 2010 Stefan Huska, released under the MIT license