Forum: Ruby on Rails Business Logic and where to place with rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Berlin B. (Guest)
on 2006-05-04 03:30
(Received via mailing list)
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
Alex Y. (Guest)
on 2006-05-04 13:17
(Received via mailing list)
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...
This topic is locked and can not be replied to.