You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
366 B

# frozen_string_literal: true
require "rails/generators"
module QuestionsCrafter
module Generators
class ControllerGenerator < Rails::Generators::NamedBase
source_root File.expand_path("templates", __dir__)
def create_controller_file
template "controller.rb.erb", "app/controllers/#{file_name}_controller.rb"
end
end
end
end