1 class ComicStory < Peta::Leaf
7 validates :comic_id, :presence => true, :numericality => true, :existence => {:both => false}
8 validates :story_id, :presence => true, :numericality => true, :existence => {:both => false}
9 validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
17 def overwrite operators
18 return false unless operators.author
26 I18n.t('comic_stories.show.t', :t => self.disp_t)
30 self.disp_t_by_text + ':' + self.story.title
33 def self.public_list_where list
37 def self.by_author_list_includes
54 return nil if self.story_id == nil or self.comic_id == nil
55 self.comic.own?(operators) and self.story.own?(operators)