[Nitro] Possible BUG in lib/og/relation/has_many.rb (and possible fix)

Chris Burnley chris.burnley at gmail.com
Tue Jan 31 08:41:28 EST 2006


How about this : create an open class to define to_yaml on the member_class

--- /usr/lib/ruby/gems/1.8/gems/og-0.27.0/lib/og/collection.rb    2006-01-31
13:32:18.000000000 +0000
+++ collection.rb    2006-01-31 13:36:35.000000000 +0000
@@ -56,11 +56,6 @@
       count_proc = nil, find_options = {})
     @owner = owner
     @member_class = member_class
-    class << @member_class
-    def to_yaml(arg)
-        to_s
-    end
-    end
     @insert_proc = insert_proc
     @remove_proc = remove_proc
     @find_proc = find_proc




Chris


On 1/31/06, Aidan Rogers <aidan at yoyo.org> wrote:
>
> I don't like my solution much either, but I need working code :-)  If
> someone can fix it more elegantly, please do.
>
> Aidan
>
> On 31/01/2006, at 11:22 PM, George Moschovitis wrote:
>
> > Hello Aidan,
> >
> > to_yaml is of course useful, but I dont like your solution much. Does
> > anyone have a better idea?
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20060131/1590289a/attachment.html 


More information about the Nitro-general mailing list