module MobileWorkflow module Generators # Custom scaffolding generator class ControllerGenerator < Rails::Generators::NamedBase include Rails::Generators::ResourceHelpers def self.source_root Rails.root end def copy_controller_and_spec_files template "lib/generators/mobile_workflow/templates/controller.rb", File.join("app/controllers", "#{controller_file_name}_controller.rb") template "lib/generators/mobile_workflow/templates/controller_spec.rb", File.join("spec/controllers", "#{controller_file_name}_controller_spec.rb") end end end end