Class: DuodealerApp::Generators::AppProxyControllerGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DuodealerApp::Generators::AppProxyControllerGenerator
- Defined in:
- lib/generators/duodealer_app/app_proxy_controller/app_proxy_controller_generator.rb
Instance Method Summary collapse
- #add_app_proxy_route ⇒ Object
- #create_app_proxy_controller ⇒ Object
- #create_app_proxy_index_view ⇒ Object
Instance Method Details
#add_app_proxy_route ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/generators/duodealer_app/app_proxy_controller/app_proxy_controller_generator.rb', line 16 def add_app_proxy_route inject_into_file( "config/routes.rb", File.read(File.(find_in_source_paths("app_proxy_route.rb"))), after: "mount DuodealerApp::Engine, at: '/'\n" ) end |
#create_app_proxy_controller ⇒ Object
8 9 10 |
# File 'lib/generators/duodealer_app/app_proxy_controller/app_proxy_controller_generator.rb', line 8 def create_app_proxy_controller template "app_proxy_controller.rb", "app/controllers/app_proxy_controller.rb" end |
#create_app_proxy_index_view ⇒ Object
12 13 14 |
# File 'lib/generators/duodealer_app/app_proxy_controller/app_proxy_controller_generator.rb', line 12 def create_app_proxy_index_view copy_file "index.html.erb", "app/views/app_proxy/index.html.erb" end |