I inherited an app that created STATES & COUNTRIES as global hashes in
config/environment.rb

STATES = {}
STATES[:AL] = 'Alabama'
STATES[:AK] = 'Alaska'
STATES[:AZ] = 'Arizona'
...

I'm able to render the name correctly like this...
<%= STATES[:AK] %>

But what is the syntax to call that dynamically?  This does not
work...
<%= STATES[location.state] %>

Thanks, I'm stumped on this noob issue.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to