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
22 23 24 |
# File 'app/models/cmtool/quote.rb', line 22 def self.active(*args) database.view((*args)) end |
.for_page ⇒ Object
26 27 28 |
# File 'app/models/cmtool/quote.rb', line 26 def self.for_page active(:startkey => ['page'], :endkey => ['page', {}]) end |
.for_sidebar ⇒ Object
34 35 36 |
# File 'app/models/cmtool/quote.rb', line 34 def self. active(:startkey => ['sidebar'], :endkey => ['sidebar', {}], :limit => 2) end |
.states ⇒ Object
30 31 32 |
# File 'app/models/cmtool/quote.rb', line 30 def self.states STATES end |