Using Rails 3, I have a :scope in routes.rb:
scope "(/:locale)" do
resources :products
end
In application_controller.rb I set the default :locale
def default_url_options(options={})
{:locale => "en-US"}
end
In my views, this works when I test in my browser, but fails with Rspec:
<%= link_to product.name, product %>
While running specs I see:
No route matches {:action=>"show", :controller=>"products", :locale=>#<Product id: ...>}
So, Rspec is not using the default_url_options set in application_controller.rb.
Thanks