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

George Moschovitis george.moschovitis at gmail.com
Fri Jan 20 04:33:28 EST 2006

> However, this doesn't work if the owner hasn't been saved, because it
> does not have a primary key at that point.

Hmm I am not 100% sure but your fix seems reasonable.

> puts bar.to_yaml
> There's no mention of the bazs property, as I'd expect.  This is
> definitely a bug.

Nope, this is not a bug. bazs is a virtual field so yaml cannot dump it.
Dunno how to fix this.

> Yaml complains with /usr/local/lib/ruby/1.8/yaml/rubytypes.rb:9:in
> `to_yaml': can't dump anonymous class Class (TypeError)
> but using:
> puts.find_bazs.inspect
> gives no error (although, still no bazs property in the yaml).

Hmm will check this.



More information about the Nitro-general mailing list