OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / models / artist.rb
index 467b647..3fc4bc9 100644 (file)
@@ -11,13 +11,14 @@ class Artist < Peta::Owner
   
   def supply_default
     self.name = 'no name' if self.name.blank?
+    self.user_id = nil
   end
   
   def self.find_by_author author
     Artist.find( :first, :conditions => ['author_id = ?', author.id])
   end
   
-  def self.list_where
+  def self.index_list_where list
     'artists.provider_id is null'
   end
   
@@ -25,10 +26,6 @@ class Artist < Peta::Owner
     {:include => {:user => {:author => {}}} }
   end
   
-  def self.show_json_opt
-    {:include => {:user => {:author => {}}} }
-  end
-  
   def self.export(dt = nil)
     opt = {}
     cond = if dt