I''d like to use the COUNTRIES array from FormOptionsHelper in my configuration. How do I access it? Tried DEMOGRAPHICS[''nationality''] = ActionView::Helpers::FormOptionsHelper.COUNTRIES and got ./script/../config/environment.rb:148: undefined method `COUNTRIES'' for ActionView::Helpers::FormOptionsHelper:Module (NoMethodError) ___________________ Ben Jackson Diretor de Desenvolvimento ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org http://www.incomumdesign.com
Demetrius Nunes
2005-Jul-05 03:28 UTC
Re: ActionView::Helpers::FormOptionsHelper.COUNTRIES
Ben Jackson wrote:> DEMOGRAPHICS[''nationality''] = > ActionView::Helpers::FormOptionsHelper.COUNTRIES > and got ./script/../config/environment.rb:148: undefined method > `COUNTRIES'' for ActionView::Helpers::FormOptionsHelper:Module > (NoMethodError)Hi Ben, Try this: ActionView::Helpers::FormOptionsHelper.const_get("COUNTRIES") (hint: COUNTRIES is a private constant) rgds Dema -- http://dema.ruby.com.br - Rails from a .NET perspective