rails/activerecord/test/models/movie.rb
chrisfinne 3a66179438 AR .persisted? throws SystemStackError for an unsaved model with a
custom primary_key that didn't save due to validation error
2014-03-27 15:01:31 -03:00

6 lines
99 B
Ruby

class Movie < ActiveRecord::Base
self.primary_key = "movieid"
validates_presence_of :name
end