On Jan 3, 4:47 pm, José Valim <[email protected]> wrote:
> A good start point can be this plugin:
>
>  http://github.com/rsl/stringex/tree/master
>
> It already deals with accents to generate slugs.

Hi José,
I want to do just the opposite, i.e. allow the use of accents
everywhere, slug included. An example is

  http://it.wikipedia.org/wiki/Usabilit%C3%A0

this url is ugly, but in your browser it looks so

  http://it.wikipedia.org/wiki/Usabilità

Rails can do it and it works.  I have also written working tests with
RSpec and Cucumber.  But you need to change 5 regular expressions to
accept [à-ùÀ-Ù] as word characters.

The nice thing is you need to use '%C3%A0' only to build the route

  map.resource :usabilità, :as => 'usabilit%C3%A0'

but in the tests (spec and features), the view, the url, the
controller, the models, the migrations, and the database you will use
'à'.

Marcello
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to