Sha256: b54a8c8c5897dd118c40f418118cc13d8dfab576bf1d462882e51b8ea05b8fb9
Contents?: true
Size: 757 Bytes
Versions: 3
Compression:
Stored size: 757 Bytes
Contents
module FormCutter module Generators class InstallGenerator < Rails::Generators::Base desc "Copy FormCutter default files" source_root File.expand_path('../templates', __FILE__) class_option :template_engine def copy_initializers copy_file 'form_cutter.rb', 'config/initializers/form_cutter.rb' end def copy_templates copy_file 'default.html.erb', 'app/views/forms/default.html.erb' end def copy_locale_file copy_file 'en.yml', 'config/locales/form_cutter.en.yml' end def copy_scaffold_template engine = options[:template_engine] copy_file "_form.html.#{engine}", "lib/templates/#{engine}/scaffold/_form.html.#{engine}" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems