[Radiant] Re: [Radiant-Dev] [ANN] Styles 'n Scripts Extension
Sean Cribbs
seancribbs at gmail.com
Sat May 17 09:44:57 CDT 2008
>
> Does anyone know how to append classes to UserActionObserver? I'd
> like to fix this issue but if I have my extension's activate method call:
> UserActionObserver.observe Stylesheet, Javascript
>
Yes, for some unknown reason, observe redefines the "observed_classes"
method instead of changing a class variable. Go figure.
I would do something like this:
new_classes = UserActionObserver.instance.send(:observed_classes) +
[Stylesheet, Javascript]
class << UserActionObserver.instance
define_method :observed_classes { new_classes }
end
Not sure about the scoping on that, etc, but that's the general outline.
Sean
More information about the Radiant
mailing list