I am using one file in the initializers directory to declare constants for use in different parts of the application.
FIRST_STR = "First Name"
LAST_STR = "Last Name"
new_user_hash = Hash.new
new_user_hash[ "first" ] = FIRST_STR
new_user_hash[ "last" ] = LAST_STR
I have no problem using FIRST_STR and LAST_STR in different parts of the application, but when I try to use new_user_hash, I get the following error message:
undefined local variable or method `new_user_hash' for #<#:0x007f8da5752da0>
Is it not possible to define/declare a hash in one file and use it in another?
new_user_hash? It can't be accessed outside of that file since it's a local variable.