OSDN Git Service

fix sb engine
[pettanr/pettanr.git] / app / models / speech.rb
index e51ef90..134c038 100644 (file)
@@ -34,6 +34,10 @@ class Speech < ActiveRecord::Base
     self.speech_balloon.panel.visible? roles
   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
@@ -43,11 +47,11 @@ class Speech < ActiveRecord::Base
   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