OSDN Git Service

fix license picture
[pettanr/pettanr.git] / app / models / system_picture.rb
index 8a3210d..8b25d19 100644 (file)
@@ -1,8 +1,9 @@
-class SystemPicture < Peta::Item
+class SystemPicture < Peta::SystemResource
   load_manifest
   has_many :balloons
   has_many :speech_balloon_templates
   has_many :licenses
+  has_many :writing_formats
   
   validates :ext, :presence => true, :length => {:maximum => 4}, :inclusion => {:in => ['png', 'jpeg', 'gif']}
   validates :width, :presence => true, :numericality => true, :natural_number => true
@@ -47,30 +48,10 @@ class SystemPicture < Peta::Item
     self.tmb_opt_img_tag
   end
   
-  def self.list_where
-    nil
-  end
-  
-  def self.list_order
-    'system_pictures.updated_at desc'
-  end
-  
-  def self.list_opt
-    {}
-  end
-  
-  def self.list_json_opt
-    {}
-  end
-  
   def self.show_opt
     {}
   end
   
-  def self.show_json_opt
-    {}
-  end
-  
   def store(imager)
     unless imager
       self.errors.add :base, 'illegal picture data'