#ストーリー
-class Story < Peta::Content
+class Story < Peta::Binder
load_manifest
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 tag_attributes column = nil, opt = {}
- {
- }
- end
-
def supply_default
self.comic_id = nil
self.visible = 0 if self.visible.blank?
def visible? operators
return false unless super
- self.owner_model.visible? operators
+ self.visible > 0
end
def disp_t
{:comic => {:author => {}} }
end
+ def self.by_author_list_includes
+ {
+ :comic => {
+ :author => {}
+ }
+ }
+ end
+
def self.list_json_opt
{:include => {:comic => {:include => {:author => {}}} }}
end