OSDN Git Service

temp
[pettanr/pettanr.git] / app / models / artist.rb
index e1ef12d..9f702a4 100644 (file)
@@ -8,8 +8,22 @@ class Artist < Pettanr::Owner
   validates :user_id, :numericality => true, :existence => {:both => false}
   validates :provider_id, :numericality => {:allow_nil => true}
   
-  @@valid_encode_columns += ['name']
   @@visible_count_options = {:conditions => ['artists.author_id is not null']}
+  def self.singular
+    'Artist'
+  end
+  
+  def self.plural
+    'Artists'
+  end
+  
+  def self.owner_type
+    :author
+  end
+  
+  def self.valid_encode_columns
+    super.merge ['name']
+  end
   
   def supply_default
     self.name = 'no name' if self.name.blank?