On Monday 20 April 2009, Thomas Voigt wrote:
> Als Workaround habe ich erstmal das hier gemacht:
>
> temp_date = eintrag.updated_at
> eintrag.save
> sql = ActiveRecord::Base.connection();
> sql.begin_db_transaction
> sql.update "UPDATE `eintraege` SET `updated_at` =
> '"+temp_date.to_s(:db)+"' WHERE `id` = "+eintrag.id.to_s
> sql.commit_db_transaction
>
> Also: ActiveRecord umgehen.
>
> Vielleicht hat ja jemand einen Tipp, wie's schöner geht.

Du könntest auf den betroffenen Objekten

  obj.send(:changed_attributes).clear

aufrufen. Das sieht nur schöner aus, greift aber tief in die 
Implementierung rein. Schau selbst in ActiveRecord::TimeStamp und 
ActiveRecord::Dirty.

Michael

-- 
Michael Schuerig
mailto:[email protected]
http://www.schuerig.de/michael/

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

Antwort per Email an