[Nitro] OgFile OgImage and my problems

Michael Fellinger m.fellinger at gmail.com
Sun Nov 27 00:19:20 EST 2005

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 happens

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 
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: controller.rb
Type: application/x-ruby
Size: 1840 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051127/066fd287/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: model.rb
Type: application/x-ruby
Size: 3010 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051127/066fd287/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051127/066fd287/attachment-0002.bin 

More information about the Nitro-general mailing list