Don't know if this is possible but I am trying to save myself a lot of
I have a global variable $school in my application helper which is used
to keep track of which school i need to access.
In my controller I have several different databases i need to access
depending on which school I am using. To do this I have the following
code in my controller:
$school.find(:all) where $school == my model that I want to query.
$school doesnt seem to resolve correctly so that my database is queried.
In my application helper i set $school = "Item" or any other string.
Is there a way to do this so I don't have to write several if statements
to determine the model i want to access?