MailingList


Locale.language_code not being set in the test environment.

View: New views
1 Messages — Rating Filter:   Alert me  

Locale.language_code not being set in the test environment.

by virginian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have added a language bar to switch languages for my app.

But I am getting 60 or so errors (all the same) when I have
incorporated the language bar all when I am using set_user_language


The code works fine when I run it it just blows up all my old tests.

The error I am getting is

http://pastie.caboo.se/143455

my set_locale method looks like

http://pastie.caboo.se/143458

I moved the partial to the application helper like

 def set_user_language
  LOCALES.keys.map {|code|
  link_to_unless code == Locale.language_code, code, url_for(:locale
=> code) }.join("|")
 end

my globalize.rb file looks like

http://pastie.caboo.se/143459


I have narrowed the problem down to the
Locale.language_code
 not being set in the test environment.

Any ideas on what I am doing wrong?
Any help would be greatly appreciated.

Best Regards-
 Charles Harvey