self.author_id = operators.author.id
end
- def self.public_list_where
- 'sheets.visible > 0'
- end
-
- def self.list_order
- 'sheet_panels.updated_at desc'
- end
-
- def self.play_list_where cid
- ['sheet_panels.sheet_id = ?', cid]
- end
-
- def self.play_list sheet, author
- SheetPanel.where(self.play_list_where(sheet.id)).includes(SheetPanel.list_opt).order('sheet_panels.t')
- end
-
def self.by_author_list_includes
{
:sheet => {
}
end
- def self.list_opt
- {
- :author => {},
- :sheet => {
- :author => {}
- },
- :panel => {
- :author => {},
- :panel_pictures => {:picture => {:artist => {}, :license => {}}},
- :speech_balloons =>{:balloon => {}, :speech => {}}
- }
- }
- end
-
- def self.list_json_opt
- {:include => {
- :author => {},
- :sheet => {
- :author => {}
- },
- :panel => {
- :author => {},
- :panel_pictures => {:picture => {:artist => {}, :license => {}}},
- :speech_balloons =>{:balloon => {}, :speech => {}}
- }
- }}
- end
-
def self.show_opt
{:include => {
:author => {},