I have added a custom class to the lib folder and can initialize the class and call an attribute but can not call a method from the class without getting the following error
unde开发者_如何转开发fined method `colour' for #
Any ideas what I'm doing wrong?
I'm using rails 3
Can we see some code? Which version of rails?
My understanding is that not everything from lib is automatically loaded in rails 3.
See this post:
Best way to load module/class from lib folder in Rails 3?
Why not move the class to the models folder? I don't use lib so much anymore...
精彩评论