Group: comp.lang.ruby
From: Jakub =?UTF-8?B?S3XFum1h?=
Date: Saturday, February 16, 2008 3:58 PM
Subject: Problem with saving associated object

Hi!
I've following problem:

class City < ActiveRecord::Base
has_one :marker
end

class Marker < ActiveRecord::Base
belongs_to :city
end

>> city =3D City.find(1)
=3D> #updated_at: "2008-02-16 22:26:53">
>> city.marker.latitude =3D 60.0
=3D> 60.0
>> city.save
=3D> true
>> city.marker.latitude
=3D> 60.0
>> city.reload
=3D> #updated_at: "2008-02-16 22:28:17">
>> city.marker.latitude
=3D> 50.0

AFAIR it worked in Rails 1.2. How to get behavior like above in Rails
2.0? Any advice would be appreciated :-).

TIA - Jakub Ku=C5=BAma.

Safety Articles | Usenet Groups | Usenet News | Bluegrass