Hi Peter,
(insert usual caveat about not being an expert or anything)
I suspect what you''re trying to do is have more than one helper used by
a given controller''s view. If that''s the case, the short
answer is
this:
in your controller you say:
class BlurdyController < ApplicationController
helper ''test''
helper ''another''
end
And it will cause TestHelper and AnotherHelper methods to be available
to BlurdyController''s views. The TestHelper *module* should be defined
in helpers/test_helper.rb as:
module TestHelper
# your methods here
end
and the AnotherHelper module should be defined in
helpers/another_helper.rb as:
module AnotherHelper
# your methods here
end
If you follow that convention you get reloading during development for
free because rails knows what files to ''require'' and which
constants to
undefine - these things are critical for dynamic reloading in dev mode.
Take note: I said *module* and not class. You''ve got TestHelper
defined as a class but your helpers are not instantiated, their methods
simply get included into the relevant view class. It may be that
defining TestHelper as a class has no ill side-effects (not tried it
myself) but the convention is to have them as modules.
If I''ve missed the point of what you''re trying to achieve then
let me
know.
Regards,
Trevor
On 6-Nov-05, at 2:44 PM, Pete wrote:
> Hi guys,
>
> in development mode a module mixed into a helper class seems not to be
> reloaded
>
> inside app/helpers:
> class TestHelper
> include EvenMoreHelp
> #foo
> end
>
> module EvenMoreHelp
> # bar
> end
>
> the contents of #foo get refreshed, but not #bar...
>
> is there a way to fix that behaviour.
>
> I intend a full reload in development mode for obvious reasons.
>
>
> Regards
> Peter
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Trevor Squires
http://somethinglearned.com