views:

19

answers:

0

The locale switching on my site is behaving strangely. I decided to go with a scoped route for switching locales:

scope ":locale" do
  devise_for :accounts

  resources :eventos

  root :to => "eventos#index"

  match '/sign_in' => "Devise::Sessions#new", :as => :sign_in, :constraints => { :method => "get" }
  match 'sign_in' => "Devise::Sessions#create", :constraints => { :method => "post"}
  match 'sign_out' => "Devise::Sessions#destroy", :as => :sign_out, :constraints => { :method => "post"}

  match 'about' => "about#index"
end

match '/', :to => redirect("/br/eventos")

For some reason just beyond my understanding the urls:

http://todoseventos.heroku.com/br

http://todoseventos.heroku.com/br/eventos/

http://todoseventos.heroku.com/en/eventos/

all kill my ajax while

http://todoseventos.heroku.com/br/

http://todoseventos.heroku.com/br/eventos

http://todoseventos.heroku.com/en/eventos

all work fine.

Can someone tell me why that is happening?