diff options
author | chrisfinne <chris.finne@gmail.com> | 2014-03-15 03:32:24 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-03-27 15:01:31 -0300 |
commit | 3a661794382c3b06cbb4d6dcc1859dd569cf8652 (patch) | |
tree | 95fe12c4d22e8225a31d19a54556a0b2b2f99a3e /activerecord/test/models | |
parent | eddcdb0f1de6e7b1b503a6df8d60cd6a145ce080 (diff) | |
download | rails-3a661794382c3b06cbb4d6dcc1859dd569cf8652.tar.gz rails-3a661794382c3b06cbb4d6dcc1859dd569cf8652.tar.bz2 rails-3a661794382c3b06cbb4d6dcc1859dd569cf8652.zip |
AR .persisted? throws SystemStackError for an unsaved model with a
custom primary_key that didn't save due to validation error
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/movie.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/movie.rb b/activerecord/test/models/movie.rb index c441be2bef..0302abad1e 100644 --- a/activerecord/test/models/movie.rb +++ b/activerecord/test/models/movie.rb @@ -1,3 +1,5 @@ class Movie < ActiveRecord::Base self.primary_key = "movieid" + + validates_presence_of :name end |