Sha256: e136a9e85b3282a5839754752baa80c81c0957e396011ec26c2267a4a12d01f1
Contents?: true
Size: 719 Bytes
Versions: 4
Compression:
Stored size: 719 Bytes
Contents
require 'rails' require 'rails/generators/erb/scaffold/scaffold_generator' module Builder module Generators class ScaffoldGenerator < Erb::Generators::ScaffoldGenerator source_root File.expand_path(File.join('..', 'templates'), __FILE__) def copy_view_files available_views.each do |view| filename = filename_with_extensions view template "#{view}.html.builder", File.join('app', 'views', controller_file_path, filename) end end def self.available_views ['index', 'show', 'new', 'edit', '_form'] end def available_views self.class.available_views end def handler :builder end end end end
Version data entries
4 entries across 4 versions & 1 rubygems