ScrollPanel.where(['scroll_panels.scroll_id = ?', self.id]).count
end
- def self.public_list_order
- 'scrolls.updated_at desc'
- end
-
- def self.list_where
+ def self.public_list_where
'scrolls.visible > 0'
end
- def self.list_opt
- {:scroll_panels => {:panel => {}}, :author => {} }
- end
-
- def self.list_json_opt
- {:include => {:scroll_panels => {:include => {:panel => {}}}, :author => {}}}
- end
-
def self.show_opt
{:include => {:scroll_panels => {:panel => {}}, :author => {}}}
end