OSDN Git Service

add: license publisher
[pettanr/pettanr.git] / app / models / author.rb
index b8c236b..594e36c 100644 (file)
@@ -5,26 +5,17 @@ class Author < Peta::Owner
   has_many :comics
   has_many :sheets
   has_many :panels
-  belongs_to :working_panel, :class_name => "Panel"
   
   validates :name, :presence => true, :length => {:maximum => 30}
-  validates :working_panel_id, :numericality => {:allow_nil => true}
   validates :user_id, :numericality => true, :existence => {:both => false}
   
   def supply_default
     self.name = 'no name' if self.name.blank?
-  end
-  
-  def working?
-    self.working_panel_id and self.working_panel
+    self.user_id = nil
   end
   
   def self.show_opt
     {:include => {:user => {:artist => {}}} }
   end
   
-  def self.show_json_opt
-    {:include => {:user => {:artist => {}}} }
-  end
-  
 end