[Rails] Re: strange class_eval behavior

2010-02-26 Thread Paul PH
Frederick Cheung wrote: > On Feb 25, 6:28�pm, Paul PH wrote: >> hi again, all. >> I have the following plugin included in my active record model. >> What i'd like to do, is define a method inside class_eval which returns >> the options has that was passed into it

[Rails] strange class_eval behavior

2010-02-25 Thread Paul PH
hi again, all. I have the following plugin included in my active record model. What i'd like to do, is define a method inside class_eval which returns the options has that was passed into it via the acts_as_item :foo=>:bar in my model. What i'm finding odd is that the self.foo method can access th

[Rails] Re: Rails acts_as_* plugins, with parameters

2010-02-25 Thread Paul PH
quot; - which is what I was trying to do initially. hr :) Frederick Cheung wrote: > On Feb 25, 12:32�pm, Paul PH wrote: >> Hi all, >> I'm trying to write a plugin which will allow me to specify: >> acts_as_item :option=>:value >> >> i need to be able to access

[Rails] Rails acts_as_* plugins, with parameters

2010-02-25 Thread Paul PH
Hi all, I'm trying to write a plugin which will allow me to specify: acts_as_item :option=>:value i need to be able to access the :options=>:value hash from instances of the model also. I've tried with class_eval in the plugin, but can't get it working. I'm calling acts_as_item(options), and that