I've put code very similar to the following code in the lib directory.
A_CONSTANT = [ 'one', 'two', 'three', 'four' ]
if !session[:d] then
session[:d] = 'a string constant'
... more of the same ...
The file containing this code is named 'common.rb'. The constant and
method are then referenced in a number of my controllers similar to
class MyController ...
some_variable = Common::A_CONSTANT
When the app is run, ruby/rails is able to resolve the A_CONSTANT
reference, but I can't seem to get the method to resolve. I've tried
using require in the controller files, I've tried delimiting the
method with double colons and I've tried different names for the
module while making sure the file and module names in sync. What am I