OSDN Git Service

classname rename to module_name
[pettanr/pettanr.git] / app / models / speech.rb
index 0d1134b..4c80fd5 100644 (file)
@@ -6,9 +6,9 @@ class Speech < Peta::Element
   
   validates :speech_balloon_id, :numericality => {:allow_blank => true}
   validates :speech_balloon_template_id, :presence => true, :numericality => true, :existence => {:both => false}
-  validates :speech_balloon_template_classname, :presence => true, :length => {:maximum => 50}
+  validates :speech_balloon_template_module_name, :presence => true, :length => {:maximum => 50}
   validates :writing_format_id, :presence => true, :numericality => true, :existence => {:both => false}
-  validates :writing_format_classname, :presence => true, :length => {:maximum => 50}
+  validates :writing_format_module_name, :presence => true, :length => {:maximum => 50}
   validates :font_size, :presence => true, :numericality => {:only_integer => false}
   validates :text_align, :presence => true, :numericality => true, :inclusion => { :in => 0..3 }
   validates :fore_color, :presence => true, :numericality => {:greater_than_or_equal_to => 0, :less_than => 0x1000000}
@@ -35,7 +35,7 @@ class Speech < Peta::Element
   
   def outer_style
     {
-      'top' => self.y, 'left' => self.x, 
+      'top' => self._y, 'left' => self.x, 
       'width' => self.width, 'height' => self.height
     }
   end