Sha256: 6cf3f0e1d4edd502a89a57d581093e67318793cb9ea92ec89fb7a6602d79df15

Contents?: true

Size: 493 Bytes

Versions: 2

Compression:

Stored size: 493 Bytes

Contents

class FreemarkerGenerator < BaseScaffold
  
  def self.source_root
    File.dirname(__FILE__)
  end
  
  def build
    create_view("index")
    create_view("show")
    create_view("form")
    create_view("edit")
    create_view("new", "new#{class_name}")
  end
  
  def create_view(template_name, file_name=template_name)
  	 template("templates/#{template_name}.erb", "src/main/webapp/WEB-INF/views/#{@model}/#{file_name}.ftl")
  end
  
  def path
    "${base}/#{@model.pluralize}"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vraptor-scaffold-0.0.1.rc lib/generators/scaffold_generator/freemarker_generator/freemarker_generator.rb
vraptor-scaffold-0.0.1.beta5 lib/generators/scaffold_generator/freemarker_generator/freemarker_generator.rb