From 61640027bf08de23e0b0494e6db14ac97c9276ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sylvain=20Ab=C3=A9lard?= Date: Thu, 5 Sep 2013 17:20:17 +0200 Subject: [PATCH] Should fix #1 I love iconv, but why not trying the Rails' defaults? --- app/controllers/places_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/places_controller.rb b/app/controllers/places_controller.rb index e6ffbfc..6ef0c63 100644 --- a/app/controllers/places_controller.rb +++ b/app/controllers/places_controller.rb @@ -1,7 +1,7 @@ class PlacesController < ApplicationController def create - path = Iconv.iconv('ascii//ignore//translit', 'utf-8', params[:place][:path]).to_s.downcase.gsub(/[^0-9a-z\-\/]/,'') + path = params[:place][:path].parameterize place = Place.find_or_create_by_path(path)