balder icon indicating copy to clipboard operation
balder copied to clipboard

Tags and breadcrumbs with scandic letters don't work

Open PolarFox opened this issue 14 years ago • 1 comments

I get an error every time I use scandic chars like ä or ö in a tag name. Also albums with those chars leave ugly breadcrumbs.

Tag in question was: Ässät and below is the log. -- log start --

Started GET "/tags/assat/photos" for 127.0.0.1 at Thu Sep 22 12:33:22 +0300 2011 Processing by PhotosController#index as HTML Parameters: {"tag_id"=>"assat"} Completed 500 Internal Server Error in 3ms

NoMethodError (undefined method photos' for nil:NilClass): app/controllers/photos_controller.rb:9:inindex' app/middleware/flash_session_cookie_middleware.rb:17:in `call'

-- log end --

PolarFox avatar Sep 22 '11 09:09 PolarFox

I guess the best way to solve this is with a slug attribute that is updated each time the record is updated. I don't want to use id in the tag URL. Should it be parameterized (remove non-ascii characters)? The breadcrums uses the request.path which does not play well with non-ascii characters.

'Ässät' works for me locally though (except for the messed up breadcrumb). I have updated to Rails 3.0.10, might be the reason.

espen avatar Sep 25 '11 07:09 espen