Sha256: 4c6b69b532408c82838760aebf3866522c5a07df4f6177b140ad44e2d104ba5f
Contents?: true
Size: 691 Bytes
Versions: 9
Compression:
Stored size: 691 Bytes
Contents
require 'generators/formtastic_erb' require 'generators/erb/scaffold/scaffold_generator' module FormtasticErb module Generators class ScaffoldGenerator < Erb::Generators::ScaffoldGenerator extend TemplatePath def copy_layout_file return unless options[:layout] template "layout.html.erb", File.join("app/views/layouts", controller_class_path, "#{controller_file_name}.html.erb") end protected def copy_view(view) if view =~ /^_.*/ template "#{view}.html.erb", File.join("app/views", controller_file_path, "#{view}.html.erb") else super view end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems