Topic: Calling a Model class from a Library Module?
I'm trying to call a Model class within a lib/ module with no success.
Here's what I'm working with:
module Foo_Module #in lib/foo_module.rb
barmodel = BarModel.find_all()
#Unimportant stuff in here
When I try to run "Foo_Module.import_database" in the console, I get
NameError: uninitialized constant BarModel
BarModel was constructed with the model generator. Any ideas? I feel
like I'm just not referencing BarModel correctly. Should it
Models::BarModel or something?