OSDN Git Service

fix sb engine
[pettanr/pettanr.git] / app / models / balloon.rb
index 343b61d..76cd5f7 100644 (file)
@@ -44,6 +44,10 @@ class Balloon < ActiveRecord::Base
 self.system_picture_id = 1
   end
   
+  def get_speech_balloon
+    self.speech_balloon
+  end
+  
   def tag_id c = nil
     'panel' + tag_panel_id + tag_element_type + tag_element_id + tag_element_part_type + tag_element_part_id + c.to_s
   end
@@ -53,11 +57,11 @@ self.system_picture_id = 1
   end
   
   def tag_panel_id
-    self.speech_balloon.panel.new_record? ? '0' : self.speech_balloon.panel.id.to_s
+    self.get_speech_balloon.panel.new_record? ? '0' : self.get_speech_balloon.panel.id.to_s
   end
   
   def tag_element_id
-    self.speech_balloon.new_record? ? '0' : self.speech_balloon.id.to_s
+    self.get_speech_balloon.new_record? ? '0' : self.get_speech_balloon.id.to_s
   end
   
   def tag_element_type