validates :visible, :presence => true, :numericality => true, :inclusion => {:in => 0..1}
validates :author_id, :presence => true, :numericality => true, :existence => {:both => false}
- def self.visible_count_options
- {:conditions => 'visible > 0'}
- end
-
def supply_default
self.visible = 0 if self.visible.blank?
+ self.author_id = nil
end
def overwrite operators
def symbol_filename
end
- def self.public_list_where
+ def self.public_list_where list
'comics.visible > 0'
end
- def self.list_order
- 'comics.updated_at desc'
- end
-
- def self.list_opt
- {:comic_stories => {:story => {}}, :author => {} }
- end
-
- def self.list_json_opt
- {:include => {:comic_stories => {:include => {:story => {}}}, :author => {}}}
- end
-
def self.show_opt
{:include => {:comic_stories => {:story => {}}, :author => {}}}
end
- def self.show_json_opt
- {:include => {:comic_stories => {:include => {:story => {}}}, :author => {}}}
- end
-
- def tag_attributes column = nil, opt = {}
- {
- }
- end
-
def scenario
panels.map {|panel|
panel.scenario