OSDN Git Service

t#32046:add sheet
[pettanr/pettanr.git] / app / models / comic.rb
index 0c3527b..187385a 100644 (file)
@@ -5,6 +5,8 @@ class Comic < ActiveRecord::Base
   
   validates :title, :presence => true, :length => {:maximum => 100}
   validates :visible, :presence => true, :numericality => true, :inclusion => {:in => 0..1}
+  validates :author_id, :presence => true, :numericality => true, :existence => {:both => false}
+  
   before_validation :valid_encode
   
   def valid_encode