Oh I see.  I was doing something different... defining a sort of 
helper method "select_string_sans_blob_data()" in the same class,
and calling it in the has_many:

  has_many :x,
           :select => select_string_sans_blob_data

Don't know why that didn't work, but encapsulating it over in the
child class works fine.  Still pondering where I really want that
info, but putting it in the child class makes a certain amount of
design sense.

Thanks for the example!

        -glenn

Nick Zadrozny wrote:
> On Tue, Sep 8, 2009 at 15:04, Glenn Little <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>     Only thing I couldn't get working is I couldn't encapsulate the list
>     generation into a method:
> 
> 
> Well, my example was somewhat wrong, in that the class method was 
> defined in the wrong class. Maybe that's what was giving you the problem?
> 
> Anyway, here's a better example: http://gist.github.com/183181
> 
> That's only very lightly tested, but it /should/ work…
> 
> -- 
> Nick Zadrozny
> 
> > 

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to