Displaying 1 result from an estimated 1 matches for "botcontroller".
Did you mean:
blogcontroller
2006 May 29
0
Custom command line libraries for controllers and rails
...it in for my rails application. So far it works, but I
was worried about how rails does caching or anything else. Basically,
is this an ok approach.
So far, I put the library in RAILS_APP/lib/bot.rb
And ''bot.rb'' contains a class ''VM''.
I have a controller:
BotController..
And I put this at the top:
require File.dirname(__FILE__) + ''/../../lib/bot''
And then I just allocate an instance in one my controller methods and
that is it.
Of course, there is one instance per request which is a little
wasteful. But, that is my initial approach thus fa...