OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / models / author.rb
index 0ea5aab..c598a8a 100644 (file)
@@ -5,21 +5,19 @@ 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}
   
+  scope :find_index, -> do
+    self
+  end
+  
   def supply_default
     self.name = 'no name' if self.name.blank?
     self.user_id = nil
   end
   
-  def working?
-    self.working_panel_id and self.working_panel
-  end
-  
   def self.show_opt
     {:include => {:user => {:artist => {}}} }
   end