Rails - Calling Library From Model
You may experience this problem while developing web application with Ruby On Rails. You have succeeded calling library on your controller, but you fail to call it from your model. How to deal with such problem?
To deal with such problem, you only need to replace one word on your codes. If you call library from your controller like this one.
Then you have to call library from your model like this one.
Please notice this one. To call library from your model, you need to replace include with extend. I have tried it and it works for Rails 2.3.7 along with Ruby 1.8.7. Please let me know if it doesn't work for yours.
P.S. Currently, comment form is disabled. If you have something to say, just drop me an e-mail at kevin[at]kevinhq[dot]com