Sha256: 85a2bfd9f684b4a1479db7b83a84193f6e7c25375495fceaedde8e4be131a60b
Contents?: true
Size: 854 Bytes
Versions: 3
Compression:
Stored size: 854 Bytes
Contents
require 'rails/generators/rails/scaffold_controller/scaffold_controller_generator' module ScaffoldController class ScaffoldhubGenerator < Rails::Generators::ScaffoldControllerGenerator include Scaffoldhub::Helper remove_hook_for :template_engine hook_for :template_engine, :as => :scaffoldhub class_option :scaffold, :default => 'default', :banner => "SCAFFOLD_NAME", :type => :string, :desc => "Scaffold to use" class_option :local, :default => false, :banner => "LOCAL SCAFFOLD", :type => :boolean, :desc => "Use a local scaffold, not scaffoldhub.org" def create_controller_files each_template_file(:controller) do |controller_template_file| template controller_template_file.src, File.join('app/controllers', class_path, "#{controller_file_name}_controller.rb") end end end end
Version data entries
3 entries across 3 versions & 1 rubygems