#ストーリー
-class Story < Pettanr::Content
+class Story < Peta::Content
has_many :story_sheets
belongs_to :comic
validates :visible, :presence => true, :numericality => true, :inclusion => {:in => 0..1}
validates :t, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
- def owner_model
- self.comic
+ def tag_attributes column = nil, opt = {}
+ {
+ }
+ end
+
+ def self.owner_model
+ Comic
end
def self.valid_encode_columns
end
end
- def allow? au
+ def allow? operators
return nil if self.comic_id == nil
- self.comic.own?(au)
+ self.comic.own?(operators)
end
- def store au, old_t = nil
+ def store operators, old_t = nil
res = false
Story.transaction do
- case self.allow? au
+ case self.allow? operators
when true
self.rotate old_t
when false