Re: Custom class

Pål Bergström
Tue, 06 Oct 2009 09:51:35 -0000

Leonardo Mateo wrote:
> 2009/10/6 Pål Bergström
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:
>>>
>>> --
>>> Leonardo Mateo.
>>> There''s no place like ~
>>
>> I can''t make it work. I''ve put in the lib directory.
Do I need to make a
>> require or something? I get an error "private method
`test'' called for
> Of course you have to require them. Probably on your environment.rb if
> you want to require it only once, but you should see if that worth the
> payload. If the class is "too heavy"you should require it only
when
> you''re going to use it.
>
>
> --
> Leonardo Mateo.
> There''s no place like ~

I see. I have another solution, a custom Crypto-class, in another app
similar to this without a require (as I can see now, was a while ago)
and that works. It''s also in /lib. Can''t understan why that
works and
now it doesn''t.

I thought that custom classes in /lib or /model was included by default
without require.