OSDN Git Service

fic picture publishing
[pettanr/pettanr.git] / app / models / speech_balloon.rb
index 875041a..d5a4148 100644 (file)
@@ -10,10 +10,10 @@ class SpeechBalloon < Peta::Element
   
   validates :panel_id, :numericality => {:allow_blank => true}
   validates :speech_balloon_template_id, :presence => true, :numericality => true, :existence => {:both => false}
-  validates :classname, :presence => true, :length => {:maximum => 50}
+  validates :speech_balloon_template_classname, :presence => true, :length => {:maximum => 50}
   validates :z, :presence => true, :numericality => {:greater_than => 0}
   validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
-  validates :settings, :extend_speech_balloon => true
+  validates :speech_balloon_template_settings, :boost => {:resource_name => :speech_balloon_template}
   
   def self.by_author_list_includes
     {
@@ -56,11 +56,6 @@ class SpeechBalloon < Peta::Element
     self.panel_id = pid
   end
   
-  def visible? operators
-    return false unless super
-    self.owner_model.visible? operators
-  end
-  
   def symbol_option
     self.speech_balloon_template.symbol_option
   end
@@ -69,7 +64,7 @@ class SpeechBalloon < Peta::Element
     'speech_balloon'
   end
   
-  def self.list_where
+  def self.public_list_where
     'panels.publish > 0'
   end