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

George Moschovitis george.moschovitis at gmail.com
Tue Jan 31 07:22:15 EST 2006


Hello Aidan,

to_yaml is of course useful, but I dont like your solution much. Does
anyone have a better idea?

regards,
George.

>
> require 'og'
>
> class Foo
>    property :foo_prop, String
>    has_many :bars, Bar
> end
>
> class Bar
>    property :bar_prop, String
>    belongs_to :foo, Foo
> end
>
> bar = Bar.create
> foo = Foo.create
> foo.bars << bar
> assert_equal foo, YAML::load( foo.to_yaml )
>
> This should barf.  Apply my fix, it should work.
>
> Aidan
>

--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list