Globalize and render_component: infinite loop?

Hi,

I just installed Globalize and I’m very excited about it!

Using it with the default

map.connect ‘:controller/:action/:id’

in config/routes.rb, there is no problem, but so far I set

map.connect ‘:locale/:controller/:action/:id’

to pass the language trough the URL, it seems to enter
in an infine loop when I have a view with a render_component() call.

For sure in both above cases, the Locale.set()
is in app/controllers/application.rb.

Is it an already known bug?
Is there a way around?

Thanks for hints

I found the problem.

It was something else in the application.rb.

Actually the

map.connect ‘:locale/:controller/:action/:id’

works very well.

Bye

PS: If you’re in the same problem, I’ll explain you how to prevent the
loop.

Franco S. wrote:

I found the problem.

It was something else in the application.rb.

Actually the

map.connect ‘:locale/:controller/:action/:id’

works very well.

Bye

PS: If you’re in the same problem, I’ll explain you how to prevent the
loop.

Hi,

I have the same problem with render_component. Initialy, I jsut need to
ad on the right side a list of tag for a weblog. So I would like to
display a list of tag on every webpage (using the controller ‘tag’ and
the action ‘listing’), even if the main controller of the current page
is not ‘tag’. I don’t know if I can use a other way then
render_component to do so, but when I use it, I get a infinite loop…
such as:

Processing CategoriesController#listing (for 127.0.0.1 at 2008-05-26
21:45:16) [GET]
Session ID:
BAh7CDoMY3NyZl9pZCIlMTU2MDg2ZmUzZGIzOGRlM2VjZDViMTZhMWI2MDA0%0AZmIiCmFkbWluVCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6%0AOkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D–f08000449ccdeecc8ecd1e5c67f49baad76ebbcc
Parameters: {“action”=>“listing”, “id”=>nil,
“controller”=>“categories”}
Category Load (0.000652) SELECT * FROM categories
Rendering template within layouts/application
Rendering categories/listing
Category Columns (0.002227) SHOW FIELDS FROM categories
Start rendering component ({:controller=>“categories”, :layout=>nil,
:action=>“listing”}):

Processing CategoriesController#listing (for 127.0.0.1 at 2008-05-26
21:45:16) [GET]
Session ID:
BAh7CDoMY3NyZl9pZCIlMTU2MDg2ZmUzZGIzOGRlM2VjZDViMTZhMWI2MDA0%0AZmIiCmFkbWluVCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6%0AOkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D–f08000449ccdeecc8ecd1e5c67f49baad76ebbcc
Parameters: {“action”=>“listing”, “id”=>nil,
“controller”=>“categories”}
CACHE (0.000000) SELECT * FROM categories
Rendering template within layouts/application
Rendering categories/listing
Start rendering component ({:controller=>“categories”, :layout=>nil,
:action=>“listing”}):

Processing CategoriesController#listing (for 127.0.0.1 at 2008-05-26
21:45:16) [GET]
Session ID:
BAh7CDoMY3NyZl9pZCIlMTU2MDg2ZmUzZGIzOGRlM2VjZDViMTZhMWI2MDA0%0AZmIiCmFkbWluVCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6%0AOkZsYXNoSGFzaHsABjoKQHVzZWR7AA%3D%3D–f08000449ccdeecc8ecd1e5c67f49baad76ebbcc
Parameters: {“action”=>“listing”, “id”=>nil,
“controller”=>“categories”}
CACHE (0.000000) SELECT * FROM categories
Rendering template within layouts/application
Rendering categories/listing
Start rendering component ({:controller=>“categories”, :layout=>nil,
:action=>“listing”}):

Thanks for any help.