projects
/
cs356-p2-videostore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix object relational modeling
[cs356-p2-videostore.git]
/
app
/
models
/
coitem.rb
diff --git
a/app/models/coitem.rb
b/app/models/coitem.rb
index
e77f573
..
a6bc1ad
100644
(file)
--- a/
app/models/coitem.rb
+++ b/
app/models/coitem.rb
@@
-1,6
+1,6
@@
class Coitem < ActiveRecord::Base
-
has_one
:customer
-
has_one
:rentable
+
belongs_to
:customer
+
belongs_to
:rentable
validates_presence_of :customer_id
validates_presence_of :rentable_id