Class: Cmtool::Quote
- Inherits:
-
Object
- Object
- Cmtool::Quote
- Includes:
- Paperclip::Glue, SimplyStored::Couch
- Defined in:
- app/models/cmtool/quote.rb
Constant Summary collapse
- STATES =
%w[page sidebar]
Class Method Summary collapse
Class Method Details
.active(*args) ⇒ Object
25 26 27 |
# File 'app/models/cmtool/quote.rb', line 25 def self.active(*args) database.view((*args)) end |
.for_page ⇒ Object
29 30 31 |
# File 'app/models/cmtool/quote.rb', line 29 def self.for_page active(startkey: ['page'], endkey: ['page', {}]) end |
.for_sidebar ⇒ Object
37 38 39 |
# File 'app/models/cmtool/quote.rb', line 37 def self. active(startkey: ['sidebar'], endkey: ['sidebar', {}], limit: 2) end |
.states ⇒ Object
33 34 35 |
# File 'app/models/cmtool/quote.rb', line 33 def self.states STATES end |