This website requires JavaScript.
Explore
Help
Sign in
kotovalexarian-likes-github
/
rails--rails
Watch
1
Star
0
Fork
You've already forked rails--rails
0
mirror of
https://github.com/rails/rails.git
synced
2022-11-09 12:12:34 -05:00
Code
Releases
Activity
53e753bd80
rails--rails
/
activerecord
/
test
/
models
/
movie.rb
6 lines
99 B
Ruby
Raw
Normal View
History
Unescape
Escape
Initial git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-23 20:04:44 -05:00
class
Movie
<
ActiveRecord
::
Base
change function def self.table_name to self.table_name change def self.primary_key to self.primary_key change def self.primary_key to self.primary_key
2013-07-25 06:54:12 -04:00
self
.
primary_key
=
"
movieid
"
AR .persisted? throws SystemStackError for an unsaved model with a custom primary_key that didn't save due to validation error
2014-03-15 06:32:24 -04:00
validates_presence_of
:name
Initial git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-23 20:04:44 -05:00
end
Copy permalink