OSDN Git Service

fix license picture
[pettanr/pettanr.git] / app / models / artist.rb
index fa455cd..83ecf69 100644 (file)
@@ -9,12 +9,9 @@ class Artist < Peta::Owner
   validates :user_id, :numericality => true, :existence => {:both => false}
   validates :provider_id, :numericality => {:allow_nil => true}
   
-  def self.visible_count_options
-    {:conditions => ['artists.author_id is not null']}
-  end
-  
   def supply_default
     self.name = 'no name' if self.name.blank?
+    self.user_id = nil
   end
   
   def self.find_by_author author
@@ -25,26 +22,10 @@ class Artist < Peta::Owner
     'artists.provider_id is null'
   end
   
-  def self.list_order
-    'artists.created_at desc'
-  end
-  
-  def self.list_opt
-    {:user => {:author => {}} }
-  end
-  
-  def self.list_json_opt
-    {:include => {:user => {:author => {}}} }
-  end
-  
   def self.show_opt
     {:include => {:user => {:author => {}}} }
   end
   
-  def self.show_json_opt
-    {:include => {:user => {:author => {}}} }
-  end
-  
   def self.export(dt = nil)
     opt = {}
     cond = if dt