Method: Cloudant::Client#create_view

Defined in:
lib/cloudant/client.rb

#create_view(id, doc) ⇒ Object

Id of the design doc in which the view (doc) will be held. Views must be held in design docs; if no design doc matches the id provided, one will be created with said id.



87
88
89
90
91
92
# File 'lib/cloudant/client.rb', line 87

def create_view(id,doc)
  resp = get_design_doc(id)
  ddoc = set_views(resp,doc)

  create_design_doc(id,ddoc)
end