Where to put non-rails module in Rails tree?


#1

Hi all -

Suppose I have developed a module that is neither a model or controller
(say, it parses a config file) in plain ruby (non-Rails), where should I
put it within the rails application tree? Also, where would I put the
corresponding unit tests so that rake will run them along with my Rails
tests?

Thanks,

Ken


#2

On 2/14/07, Kenneth L. removed_email_address@domain.invalid wrote:

Hi all -

Suppose I have developed a module that is neither a model or controller
(say, it parses a config file) in plain ruby (non-Rails), where should I
put it within the rails application tree? Also, where would I put the
corresponding unit tests so that rake will run them along with my Rails
tests?

If it’s part of your biz logic, put it in /app/model (just don’t
inherit from AR::Base).

If it’s an ‘external’ library, add it to /lib, for instance using
svn:externals. Libraries should have their own tests, completely
unrelated to your rails project.

Isak