Business Logic and where to place with rails

I am having an issue of deciding where I should put the business code
for example the more complex code coming off the controller. Right now,
I am just thinking to put it in the ‘lib’ directory and the do something
along these lines:

require_dependency “system_process”
class SystemMessageController < ApplicationController

include SystemProcess

Where there is a file called ‘system_process.rb’ in my ‘lib’ directory.

Is this good, bad for rails design?


Berlin B.
(ramaza3 on freenode)
http://www.newspiritcompany.com
http://www.newspiritcompany.com/newforums
also checkout alpha version of botverse:
http://www.newspiritcompany.com:8086/universe_home

Berlin B. wrote:

Where there is a file called ‘system_process.rb’ in my ‘lib’ directory.

Is this good, bad for rails design?
That really depends on what SystemProcess is doing. 9 times out of 10,
it should be in a model, though…