Module: CouchVisible::CouchPublish

Defined in:
lib/couch_visible/integrations/couch_publish.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/couch_visible/integrations/couch_publish.rb', line 3

def self.included(base)
  base.couch_view :by_hidden do
    map CouchVisible::ByHidden
    conditions CouchVisible::Conditions::Published, CouchVisible::Conditions::Unpublished
  end

  base.couch_view :by_shown do
    map CouchVisible::ByShown
    conditions CouchVisible::Conditions::Published, CouchVisible::Conditions::Unpublished
  end
end