diff options
author | Xavier Noria <fxn@hashref.com> | 2008-05-13 00:46:57 +0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-05-12 17:04:17 -0700 |
commit | 593e21d6aedcc05d744be4996bd7180edce57efe (patch) | |
tree | 27cb4e5dbaab49554d2a5bde9971a5c9c6521c88 /activerecord/test/models | |
parent | a425cd147363a0e8d7e17177ef252dd760197f15 (diff) | |
download | rails-593e21d6aedcc05d744be4996bd7180edce57efe.tar.gz rails-593e21d6aedcc05d744be4996bd7180edce57efe.tar.bz2 rails-593e21d6aedcc05d744be4996bd7180edce57efe.zip |
Dirty attributes aren't cleared if save fails. [#174 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/pirate.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/pirate.rb b/activerecord/test/models/pirate.rb index bb4d02c10f..51c8183dee 100644 --- a/activerecord/test/models/pirate.rb +++ b/activerecord/test/models/pirate.rb @@ -4,4 +4,6 @@ class Pirate < ActiveRecord::Base has_many :treasures, :as => :looter has_many :treasure_estimates, :through => :treasures, :source => :price_estimates + + validates_presence_of :catchphrase end |