svenfuchs / routing-filter

routing-filter wraps around the complex beast that the Rails routing system is, allowing for unseen flexibility and power in Rails URL recognition and generation.
http://www.artweb-design.de
MIT License
464 stars 84 forks source link

locale filter breaks url generation #10

Closed ZenCocoon closed 13 years ago

ZenCocoon commented 14 years ago

Hi Sven,

Looks like the URL generation helpers are broken as they always requires one parameter : Error can be found at : http://gist.github.com/571591

I've tested with routing_filter gem 0.1.6, rails 2.3.9 and ruby 1.8.7/1.9.2 rc_2

I've setup a minimal app to show off the issue, please check: http://github.com/ZenCocoon/test_routing_filter

Thanks for your great work,

glongman commented 14 years ago

yep, I see this too

samlown commented 14 years ago

Adding the :locale to the default url options in your application controller gets around this problem:

def default_url_options(options = {})
  { :locale => I18n.locale }
end

Also make sure its a public method, i.e. not below a protected or private.

sam

svenfuchs commented 13 years ago

Should be done with this commit https://github.com/svenfuchs/routing-filter/commit/151adea390f1a89858eb83b88121323e94a82ae5

Can anybody confirm this?

ZenCocoon commented 13 years ago

That works fine in my case and with the test app. Thanks for the bug fix.