- def self.list_order
- 'comics.updated_at desc'
- end
-
- def self.mylist_where me
- ['comics.author_id = ?', me.id]
- end
-
- def self.mylist_order
- 'comics.updated_at desc'
- end
-
- def self.himlist_where anybody
- ['comics.author_id = ? and comics.visible > 0', anybody.id]
- end
-
- def self.himlist_order
- 'comics.updated_at desc'
- end
-
- def self.list_by_author_where author_id
- ['comics.author_id = ?', author_id]
- end
-
- def self.list_by_author author_id, roles, page = 1, page_size = self.default_page_size
- self.where(self.list_by_author_where(author_id)).includes(self.list_opt).order('comics.updated_at desc').offset((page -1) * page_size).limit(page_size)
- end
-
- def self.list_opt
- {:stories => {}, :author => {} }
- end
-
- def self.list_json_opt
- {:include => {:stories => {}, :author => {}} }
- end
-