On Jun 11, 12:40 am, Dave Howell <[email protected]>
wrote:
> I was all set to go ahead and 'create an accessor method myself' and then 
> realized I'm really not sure what to make it *on.*
> Well, on each member of self.ingredients, but the only way I see to do that 
> is (I think), to use :after_load to iterate through each one and add a 
> singleton method for 'percentage' to each. That seems very clunky. Is there a 
> better way?

If you want to create an accessor method just on objects retrieved
from that association, not really.  The better way would be to use
[:percentage] instead of .percentage.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-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/sequel-talk?hl=en.

Reply via email to