Sha256: 2a7f3088808286090fc9f49a32cf9ac853b540bc0dcf6a5650358b97150bdc85
Contents?: true
Size: 670 Bytes
Versions: 22
Compression:
Stored size: 670 Bytes
Contents
require 'generators/simple_form' require 'rails/generators/resource_helpers' module SimpleForm module Generators class ScaffoldGenerator < Base include Rails::Generators::ResourceHelpers argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" class_option :template_engine def copy_form_file filename = filename_with_extensions("_form") template template_filename_with_extensions("_form"), File.join("app/views", controller_file_path, filename) end protected def handler options[:template_engine].to_s.gsub('erubis', 'erb') end end end end
Version data entries
22 entries across 22 versions & 1 rubygems