OSDN Git Service

fix license picture
[pettanr/pettanr.git] / app / models / balloon.rb
index dc5fa3c..35f5971 100644 (file)
@@ -6,7 +6,7 @@ class Balloon < 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 :system_picture_id, :presence => true, :numericality => true, :existence => {:both => false}
   validates :x, :presence => true, :numericality => true
   validates :y, :presence => true, :numericality => true
@@ -16,7 +16,7 @@ class Balloon < Peta::Element
 #  validates :caption, :presence => true
   validates :speech_balloon_template_settings, :boost => {:boost_name => :speech_balloon_template}
 
-  def _y
+  def attr_y
     self.attributes['y']
   end
   
@@ -58,7 +58,7 @@ self.system_picture_id = 1
   def style
     {
       'width' => self.width.to_s + 'px','height' => self.height.to_s + 'px',
-      'top' => self._y.to_s + 'px','left' => self.x.to_s + 'px'
+      'top' => self.attr_y.to_s + 'px','left' => self.x.to_s + 'px'
     }
   end