OSDN Git Service

fix model
[pettanr/pettanr.git] / app / models / scroll.rb
index ab8e658..4c1d21a 100644 (file)
@@ -1,14 +1,11 @@
 class Scroll < Peta::Content
+  load_manifest
   has_many :scroll_panels
   belongs_to :author
   
   validates :title, :presence => true, :length => {:maximum => 100}
   validates :visible, :presence => true, :numericality => true, :inclusion => {:in => 0..1}
   validates :author_id, :presence => true, :numericality => true, :existence => {:both => false}
-
-  def self.valid_encode_columns
-    super + ['title']
-  end
   
   def supply_default
     self.visible = 0 if self.visible.blank?
@@ -52,11 +49,6 @@ class Scroll < Peta::Content
     {:include => {:scroll_panels => {:include => {:panel => {}}}, :author => {}}}
   end
   
-  def tag_attributes column = nil, opt = {}
-    {
-    }
-  end
-  
   def self.visible_count
     Scroll.count 'visible > 0'
   end