Sha256: 4b492a81f3c4772241ab7029a436dd6ce5113d2c7f3f445a30b2f9a36cf5475e

Contents?: true

Size: 371 Bytes

Versions: 7

Compression:

Stored size: 371 Bytes

Contents

require 'rid/generators/named_base'

module Rid::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

7 entries across 7 versions & 1 rubygems

Version Path
rid-0.5.2 lib/rid/generators/view/view_generator.rb
rid-0.5.1 lib/rid/generators/view/view_generator.rb
rid-0.5.0 lib/rid/generators/view/view_generator.rb
rid-0.4.1 lib/rid/generators/view/view_generator.rb
rid-0.4.0 lib/rid/generators/view/view_generator.rb
rid-0.3.1 lib/rid/generators/view/view_generator.rb
rid-0.3.0 lib/rid/generators/view/view_generator.rb