1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--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

5 lines
99 B
Ruby

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