Forum: Ruby on Rails Mixins

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.
9305282d6cc66f05c5dc3d8485f708af?d=identicon&s=25 DJ Tequila (Guest)
on 2006-05-11 13:03
(Received via mailing list)
If I want to write a function which will be available to views, I write
a helper function in one of the places set aside or that very task by
Rails.

If I want to write a little suite of functions to be mixed in by a
number of model classes (but not all), where do I put them? Plug-ins
look like AN answer, but they also seem a little heavyweight for simple,
project-specific tasks.
0b1b1c3a746a2e346d8cae668b109b6e?d=identicon&s=25 Chris McGrath (Guest)
on 2006-05-11 13:21
(Received via mailing list)
On 11 May 2006, at 13:02, DJ Tequila wrote:

> If I want to write a function which will be available to views, I
> write a helper function in one of the places set aside or that very
> task by Rails.
>
> If I want to write a little suite of functions to be mixed in by a
> number of model classes (but not all), where do I put them? Plug-
> ins look like AN answer, but they also seem a little heavyweight
> for simple, project-specific tasks.

I put mine in RAILS_ROOT/lib

Chris
This topic is locked and can not be replied to.