Sha256: d3696d8ebdb492699d7ff902e529903b6e382a681f3b733e281777ed82cc7cef
Contents?: true
Size: 375 Bytes
Versions: 4
Compression:
Stored size: 375 Bytes
Contents
require 'couch/generators/named_base' module Couch::Generators class ViewGenerator < NamedBase def create_view_function path = "views/#{pluralized_model_name}" empty_directory path template "map.js", "#{path}/map.js" end protected def mydoc "{ %s }" % attributes.map { |a| '"%s": doc["%s"]' % [a,a] }.join(", ") end end end
Version data entries
4 entries across 4 versions & 1 rubygems