Topic: Paperclip wrong redirect

This problem occurs only when using Paperclip.
When form is posted paperclip uploads photos and controller redirects with extra url segment.

My application is internationalized. And i'm getting double language url segment. (only when paperclip is present)

Here is log details:
Started POST "/hr/references/1" for at Wed Nov 23 12:55:11 +0100 2011
  Processing by ReferencesController#update as HTML
  Parameters: {"reference"=>{"name_en"=>"Test Reference", "position"=>"1"...}
[paperclip] Saving attachments.
[paperclip] saving /home/alfaplan/alfaplan/public/images/photos/medium/katalog-zaks_012-l.jpg
[paperclip] saving /home/alfaplan/alfaplan/public/images/photos/thumb/katalog-zaks_012-l.jpg
[paperclip] saving /home/alfaplan/alfaplan/public/images/photos/original/katalog-zaks_012-l.jpg
Redirected to
Completed 302 Found in 1344ms

Started GET "/hr/hr/references" for at Wed Nov 23 12:55:12 +0100 2011

ActionController::RoutingError (No route matches "/hr/hr/references"):

I'm running Phusion Passenger Apache/nginx.
Rails 3.0.9
Ruby 1.8.7
Paperclip 2.4.5

The problem is pretty much the same as here
Nobody Answewed that question and it's only one that i came across.


Re: Paperclip wrong redirect

Owner of the post has answered.
Continuing topic there.

Last edited by babalooi (2011-11-25 09:03:22)