Forum: Ruby on Rails where to put non-rails module in Rails tree?

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.
Kenneth L. (Guest)
on 2007-02-14 16:45
(Received via mailing list)
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
Isak H. (Guest)
on 2007-02-14 17:00
(Received via mailing list)
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
This topic is locked and can not be replied to.