Retrieving Global Arrays

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.

<%= STATES[location.state.to_sym] %> ?