Sha256: ba687e632f35d562f6ba8260fd259a3f2ac98343eb750bbf4fc66134bc1593d1

Contents?: true

Size: 601 Bytes

Versions: 3

Compression:

Stored size: 601 Bytes

Contents

class TemplateEngineGenerator < BaseScaffold

  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", "#{views_path}/#{file_name}.#{extension}")
  end

  def views_path
    File.join Configuration::WEB_INF, view_folder, model_parameter_name
  end
end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vraptor-scaffold-1.2.3 lib/vraptor-scaffold/generators/scaffold/template_engine_generator/template_engine_generator.rb
vraptor-scaffold-1.2.1 lib/vraptor-scaffold/generators/scaffold/template_engine_generator/template_engine_generator.rb
vraptor-scaffold-1.2.0 lib/vraptor-scaffold/generators/scaffold/template_engine_generator/template_engine_generator.rb