Am 23.06.2008 um 16:16 schrieb Andreas Roedl:

Hallo,

On Mon, Jun 23, 2008 at 12:22 PM, Werner Laude <[EMAIL PROTECTED] > wrote:
      picture.update_attributes(:classified_id => @classified.id)

Den update der Picturetabelle macht er nicht (..mehr)

picture.update_attributes(:classified_id => '33').. nicht mal das
hier funkt...

wahrscheinlich könnte man mehr darüber sagen, wenn man einmal das Log
sehen würde. "funkt nicht" ist immer ein wenig "schwammig"... :)


Hallo Andreas..

picture = Picture.find_by_id(session[:picture_id])
picture.update_attribute(:classified_id => @classified.id)

Picture Load (0.000510) SELECT * FROM `pictures` WHERE (`pictures`.`id` = 283) LIMIT 1
  SQL (0.000104)   BEGIN
Picture Update (0.000195) UPDATE `pictures` SET `classified_id` = 373 WHERE `id` = 283
  SQL (0.000424)   COMMIT

bis hier hin scheint es  o.k. zu sein

picture = Picture.find_by_id(session[:picture_id])
picture.update_attributes(:classified_id => @classified.id)

@classified.picture = picture

Picture Load (0.000542) SELECT * FROM `pictures` WHERE (`pictures`.classified_id = 373) LIMIT 1
  SQL (0.000093)   BEGIN
Picture Update (0.000168) UPDATE `pictures` SET `classified_id` = NULL WHERE `id` = 283
  SQL (0.017758)   COMMIT

die classified_id wird gespeichert und dann sofort wieder mit NULL überschrieben..

Jemand einen Tipp??

Gruß

Werner Laude
Lindenburger Allee 22  -  50931 Köln

0221.8805 635

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

http://www.webagentur-laude.de

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

Antwort per Email an