kwi/i18n_routing — Issue #30: Issue when wrapping localized block in scope
Author: ncri
Created: 2011-10-16 12:21:28+00:00
State: open

When I do

```
scope "(:locale)", :locale => /(fr-CH)/ do
localized do
match '/inserieren' => 'site#advertise', :as => :advertise
end
end
```

and then go to /fr-CH/advertise

I get this error:

NoMethodError: undefined method `locale' for #

```

rack-mount (0.8.3) lib/rack/mount/code_generation.rb:543:in `optimized_each'
rack-mount (0.8.3) lib/rack/mount/code_generation.rb:95:in `recognize'
rack-mount (0.8.3) lib/rack/mount/route_set.rb:141:in `call'
actionpack (3.1.0) lib/action_dispatch/routing/route_set.rb:531:in `call'
oa-core (0.2.6) lib/omniauth/strategy.rb:44:in `call!'
oa-core (0.2.6) lib/omniauth/strategy.rb:30:in `call'
oa-core (0.2.6) lib/omniauth/builder.rb:30:in `call'
newrelic_rpm (3.1.1) lib/new_relic/rack/browser_monitoring.rb:18:in `call'
sass (3.1.7) lib/sass/plugin/rack.rb:54:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.3.2) lib/rack/etag.rb:23:in `call'
rack (1.3.2) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/flash.rb:243:in `call'
rack (1.3.2) lib/rack/session/abstract/id.rb:195:in `context'
rack (1.3.2) lib/rack/session/abstract/id.rb:190:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/cookies.rb:326:in `call'
activerecord (3.1.0) lib/active_record/query_cache.rb:62:in `call'
activerecord (3.1.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (3.1.0) lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
activesupport (3.1.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.1.0) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/reloader.rb:68:in `call'
rack (1.3.2) lib/rack/sendfile.rb:101:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.1.0) lib/rails/rack/logger.rb:13:in `call'
rack (1.3.2) lib/rack/methodoverride.rb:24:in `call'
rack (1.3.2) lib/rack/runtime.rb:17:in `call'
activesupport (3.1.0) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.3.2) lib/rack/lock.rb:15:in `call'
rack-rewrite (1.0.2) lib/rack/rewrite.rb:19:in `call'
actionpack (3.1.0) lib/action_dispatch/middleware/static.rb:53:in `call'
railties (3.1.0) lib/rails/engine.rb:455:in `call'
railties (3.1.0) lib/rails/rack/content_length.rb:16:in `call'
railties (3.1.0) lib/rails/rack/log_tailer.rb:14:in `call'
thin (1.2.11) lib/thin/connection.rb:84:in `block in pre_process'
thin (1.2.11) lib/thin/connection.rb:82:in `catch'
thin (1.2.11) lib/thin/connection.rb:82:in `pre_process'
thin (1.2.11) lib/thin/connection.rb:57:in `process'
thin (1.2.11) lib/thin/connection.rb:42:in `receive_data'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
thin (1.2.11) lib/thin/backends/base.rb:61:in `start'
thin (1.2.11) lib/thin/server.rb:159:in `start'
rack (1.3.2) lib/rack/handler/thin.rb:13:in `run'
rack (1.3.2) lib/rack/server.rb:265:in `start'
railties (3.1.0) lib/rails/commands/server.rb:70:in `start'
railties (3.1.0) lib/rails/commands.rb:54:in `block in '
railties (3.1.0) lib/rails/commands.rb:49:in `tap'
railties (3.1.0) lib/rails/commands.rb:49:in `'
script/rails:6:in `require'
script/rails:6:in `'
-e:1:in `load'
-e:1:in `

'
```