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