Class: JqtouchHelloworldGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- JqtouchHelloworldGenerator
- Defined in:
- lib/generators/jqtouch_helloworld_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_initializer_file ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/jqtouch_helloworld_generator.rb', line 5 def create_initializer_file insert_into_file "config/routes.rb", " get 'helloworld', to: 'jqtouch_pages#helloworld'\n", after: "::Application.routes.draw do\n" create_file "app/controllers/jqtouch_pages_controller.rb", " class JqtouchPagesController < ApplicationController def helloworld end end " copy_file "helloworld.html", "app/views/jqtouch_pages/helloworld.html.erb" end |