/my_module/my_code
and inside lives my_class.rb:
module MyModule::MyCode
class MyClass < ActiveRecord::Base
def foo
end
end
end
I would like to be able to access the MyClass class in my controller via:
MyCode::MyClass.foo
I was under the impression this was possible by including the MyModule
module in application.rb but it doesn't work. The only way I can
access the MyClass class is via MyModule::MyCode.MyClass.foo which is
a mouthful.
Any ideas??
Thanks!
What error do you get? Does it suggest that it doesn't exist?
Zach Inglis
→ Blog -- http://www.zachinglis.com
→ Company -- http://www.lt3media.com
→ Portfolio -- http://portfolio.zachinglis.com
--
Rich Brant
Senior Developer
Mediagistics, LLC
Tel: (215) 674-4515
Mobile: (267) 640-2195
Email: rbr...@mediagistics.com