OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / models / story_sheet.rb
index b290a30..0d09dcb 100644 (file)
@@ -1,12 +1,10 @@
 class StorySheet < Peta::Leaf
   load_manifest
-  belongs_to :author
   belongs_to :story
   belongs_to :sheet
   
   validates :story_id, :presence => true, :numericality => true, :existence => {:both => false}
   validates :sheet_id, :presence => true, :numericality => true, :existence => {:both => false}
-  validates :author_id, :presence => true, :numericality => true, :existence => {:both => false}
   validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
   
   def supply_default
@@ -16,11 +14,9 @@ class StorySheet < Peta::Leaf
   end
   
   def overwrite operators
-    return false unless operators.author
-    self.author_id = operators.author.id
   end
   
-  def self.public_list_where
+  def self.public_list_where list
     'stories.visible > 0'
   end
   
@@ -34,7 +30,6 @@ class StorySheet < Peta::Leaf
   
   def self.show_opt
     {:include => {
-      :author => {}, 
       :story => {}, 
       :sheet => {
         :author => {}