Business logic for a rails/ruby application

R

Ramza Brown

Ideally, this is a rails question. My question; where do you normally
put your business logic in a rails application. I have seen a lot
people place the code mostly in their controller. But, lets I want to
put code in the 'lib' directory. Is that a normaly place. Also, can
you launch threads within the rails container for example with lighttpd
or webbrick.

This is what I have been doing:

lib/the_lib.rb

module TheLib
end

require_dependency 'the_lib'

app/controller
SomeController < ApplicationController
include TheLib
end

??

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,121
Latest member
LowellMcGu
Top