Sha256: 0b534fa60125370b8636bc97cfbc050989e7be0b5f485b1f3e2f20af55d53334

Contents?: true

Size: 671 Bytes

Versions: 2

Compression:

Stored size: 671 Bytes

Contents

class TemplateEngineGenerator < BaseScaffold

  def build
    define_source_paths
    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("#{template_name}.erb", "#{views_path}/#{file_name}.#{extension}")
  end

  def views_path
    File.join Configuration::WEB_INF, view_folder, model_parameter_name
  end
  
  def template_path
    "src/templates/views"
  end

end

require File.dirname(__FILE__) + "/jsp_generator/jsp_generator"
require File.dirname(__FILE__) + "/freemarker_generator/freemarker_generator"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vraptor-scaffold-1.3.0 lib/vraptor-scaffold/generators/scaffold/template_engine_generator/template_engine_generator.rb
vraptor-scaffold-1.3.0.rc lib/vraptor-scaffold/generators/scaffold/template_engine_generator/template_engine_generator.rb