OSDN Git Service

fix: new elm
[pettanr/pettanr.git] / app / models / artist.rb
index 3604e57..3fc4bc9 100644 (file)
@@ -7,7 +7,7 @@ class Artist < Peta::Owner
   
   validates :name, :presence => true, :length => {:maximum => 30}
   validates :user_id, :numericality => true, :existence => {:both => false}
-  validates :provider, :numericality => {:allow_nil => true}
+  validates :provider_id, :numericality => {:allow_nil => true}
   
   def supply_default
     self.name = 'no name' if self.name.blank?
@@ -18,8 +18,8 @@ class Artist < Peta::Owner
     Artist.find( :first, :conditions => ['author_id = ?', author.id])
   end
   
-  def self.list_where
-    'artists.provider is null'
+  def self.index_list_where list
+    'artists.provider_id is null'
   end
   
   def self.show_opt