Sha256: 450712aeab0a89267d5b4d37ba27c8471f1bf0c47f5f8414bb2562859b9a864f
Contents?: true
Size: 720 Bytes
Versions: 3
Compression:
Stored size: 720 Bytes
Contents
require "rails/generators/base" module DuodealerApp module Generators class AppProxyControllerGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) def create_app_proxy_controller template "app_proxy_controller.rb", "app/controllers/app_proxy_controller.rb" end def create_app_proxy_index_view copy_file "index.html.erb", "app/views/app_proxy/index.html.erb" end def add_app_proxy_route inject_into_file( "config/routes.rb", File.read(File.expand_path(find_in_source_paths("app_proxy_route.rb"))), after: "mount DuodealerApp::Engine, at: '/'\n" ) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems