Re: [Rails] metaprogramming, define_method, and class_eval issues

2010-04-09 Thread Andy Jeffries
> > The first part of my question is whether there is a way to pass in a > reference to the calling class (klass) without first setting it as a > variable. My understand is that if I used self directly in the > class_eval statement, it would evaluate to Rclient. > You should use the included call

[Rails] metaprogramming, define_method, and class_eval issues

2010-04-08 Thread klochner
I have a 2-part question here that's a little tricky and starting to make my head hurt. I'm working on a plugin for personal use, where I have an rclients table (not named clients because of conflicts with another plugin), and several other models that can have Rclients (polymorphic association).