aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2009-04-16 17:25:55 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-04-16 17:25:55 -0500
commitabb899c54e8777428b7a607774370ba29a5573bd (patch)
tree7fe740e4df2db5f96900e1d536db733da8edd42f /activerecord/test/models
parentfdb61f02c54bda0ad5ff6d0259209113202b9307 (diff)
downloadrails-abb899c54e8777428b7a607774370ba29a5573bd.tar.gz
rails-abb899c54e8777428b7a607774370ba29a5573bd.tar.bz2
rails-abb899c54e8777428b7a607774370ba29a5573bd.zip
Added :touch option to belongs_to associations that will touch the parent record when the current record is saved or destroyed [DHH]
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/pet.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/pet.rb b/activerecord/test/models/pet.rb
index dc1a3c5e94..a8bf94dd86 100644
--- a/activerecord/test/models/pet.rb
+++ b/activerecord/test/models/pet.rb
@@ -1,5 +1,5 @@
class Pet < ActiveRecord::Base
set_primary_key :pet_id
- belongs_to :owner
+ belongs_to :owner, :touch => true
has_many :toys
end