mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
3a66179438
custom primary_key that didn't save due to validation error
5 lines
99 B
Ruby
5 lines
99 B
Ruby
class Movie < ActiveRecord::Base
|
|
self.primary_key = "movieid"
|
|
|
|
validates_presence_of :name
|
|
end
|