Re: modifying ActiveRecord::Base - where?

Ezra Zygmuntowicz
Tue, 06 Dec 2005 15:38:04 -0000

On Dec 5, 2005, at 10:26 PM, Ara.T.Howard wrote:

> On Mon, 5 Dec 2005, Duane Johnson wrote:
>
>> Traditionally, it would go in your lib/ folder and then you''d
add
>> something
>> like ''require "my_active_record.rb"'' in
your environment.rb file.
>> I usually
>> go one step further and add a ''patches'' folder within
''lib'' so I can
>> differentiate between rails additions and other libraries.
>
> hmmm.  i''d like to have it autoloaded - guess i could put the
> require in my
> environment.rb then.  that kosher?
>
>> Nowadays, however, it seems that plugins may do exactly what
>> you''re after.
>> But it seems a little overkill to put one tiny method like that
>> into a
>> plugin.
>
> agreed.
>
>
> -a
> --

Ara- FYI you can require it with require_dependency if you want it to
be reloaded in dev mode in case you want to make changes to it
without restarting the webserver.

Cheers-
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
509-577-7732