OSDN Git Service

t#:
[pettanr/pettanr.git] / app / models / panel_picture.rb
index a68af58..e74806c 100644 (file)
@@ -14,8 +14,8 @@ class PanelPicture < Pettanr::Content
   validates :z, :presence => true, :numericality => {:greater_than => 0}
   validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
   
-  def owner_model
-    self.panel
+  def self.owner_model
+    Panel
   end
   
   def self.valid_encode_columns
@@ -147,7 +147,7 @@ class PanelPicture < Pettanr::Content
     {:include => {:panel => {:include => {:author => {}}}, :picture => {:include => {:artist => {}, :license => {}}} }}
   end
   
-  def store au
+  def store operators
     if self.new_record?
       self.panel.panel_pictures.build(self.attributes)
     else
@@ -159,11 +159,11 @@ class PanelPicture < Pettanr::Content
         break
       end
     end
-    self.panel.store({}, au)
+    self.panel.store({}, operators)
   end
   
-  def remove au
-    self.panel.remove_element(self, au)
+  def remove operators
+    self.panel.remove_element(self, operators)
   end
   
   def scenario