OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
t30350#:fix destroy
[pettanr/pettanr.git]
/
app
/
models
/
author.rb
diff --git
a/app/models/author.rb
b/app/models/author.rb
index
83db8dc
..
d574bae
100644
(file)
--- a/
app/models/author.rb
+++ b/
app/models/author.rb
@@
-1,6
+1,8
@@
class Author < ActiveRecord::Base
has_one :artist
belongs_to :user
+ has_many :comic
+ has_many :panel
validates :name, :presence => true, :length => {:maximum => 30}
validates :user_id, :numericality => true, :existence => {:both => false}