Class: DuodealerApp::Generators::HomeControllerGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/duodealer_app/home_controller/home_controller_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_home_index_routeObject



16
17
18
# File 'lib/generators/duodealer_app/home_controller/home_controller_generator.rb', line 16

def add_home_index_route
  route "root :to => 'home#index'"
end

#create_home_controllerObject



8
9
10
# File 'lib/generators/duodealer_app/home_controller/home_controller_generator.rb', line 8

def create_home_controller
  template "home_controller.rb", "app/controllers/home_controller.rb"
end

#create_home_index_viewObject



12
13
14
# File 'lib/generators/duodealer_app/home_controller/home_controller_generator.rb', line 12

def create_home_index_view
  copy_file "index.html.erb", "app/views/home/index.html.erb"
end

#embedded_app?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/generators/duodealer_app/home_controller/home_controller_generator.rb', line 20

def embedded_app?
  DuodealerApp.configuration.embedded_app?
end