>
> 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 callback which includes the class it's being
included into

http://ruby-doc.org/core/classes/Module.html#M001660

So your acts_as_client_entity should include the module in to the current
class, then you should do your initialisation in the included method.


> The second part of my questions is why I had to use define_method for
> primary_client= (as opposed to def primary_client=).  I kept getting
> conflicts with the dynamic methods rails created from the statement
>
>  has_one :primary_client . . .
>
> I would just like to know why define_method seems to be a little more
> forceful.
>

No idea, sorry.

Cheers,


Andy

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to