[Nitro] OgFile OgImage and my problems
m.fellinger at gmail.com
Sun Nov 27 02:22:39 EST 2005
Ok, i think i have solved that problem now by letting Og more room to play:
has_many :thumbnails Thumbnail
out of some reason og likes this notation better... however now i'm thinking
how to make an elegant bridge over the fact that the callback of Thumbnail is
made on Thumbnail.new - i fear that i have to do some ugly workaround (even
the current way is not pretty)
i'll post when i find out more
Am Sonntag 27 November 2005 06:19 schrieb Michael Fellinger:
> Hey List,
> Now i wanted to post a perfect and polished version of OgFile OgImage and
> Thumbnail, my latest generally useful og-objects... but somehow that didn't
> work out so well.
> I am stuck, right before i could add the last polishing because of
> something that must be quite obvious. I've just attached model and
> controller for now, i would be very glad if someone could help me - the
> problem is following:
> OgImage creates Thumbnails, but i cannot assign the thumbnails to the
> OgImage that calls them.
> I have tired various ways...
> OgImage[@oid].thumbnails << (thumb = Thumbnail.new) # => method_missing
> '<<' @thumbnails << ..... # => method_missing....
> OgImage[@oid].add_thumbnail(thumb) # all of the three have no effect
> thumb.og_image_oid = @oid # => no error, nothing happens
> Thumbnail[thumb.oid].og_image_oid = @oid #=> same again
> Thumbnail.find_by_oid(thumb.oid).og_image_oid = @oid #=> nothing ever
> and about 20 other variants before of after the thumb.save! - what the heck
> am i doing wrong? i'm running out of ideas, and something seems to be
> flawed here...
> Everytime i check the database (using sqlite for testing), no og_image_oid
> is assigned, also i wonder why OgImage doesn't get a proper linkage to the
> thumbnails... it looks quite unaffected
> well, that's it, i appreciate every helping hand
> Michael 'manveru' Fellinger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051127/97fecdd7/attachment.bin
More information about the Nitro-general