Class: AriGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- AriGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/ari_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
6 7 8 |
# File 'lib/generators/ari_generator.rb', line 6 def self.source_root @source_root ||= File.(File.join(File.dirname(__FILE__), 'templates/')) end |
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/generators/ari_generator.rb', line 10 def create template "views/index.html.erb", File.join('app/views', 'ari', "index.html.erb") template "views/show.html.erb", File.join('app/views', 'ari', "show.html.erb") template "views/_styles.html.erb", File.join('app/views', 'ari', "_styles.html.erb") template "views/_paging.html.erb", File.join('app/views', 'ari', "_paging.html.erb") template "controllers/ari_controller.rb", File.join('app/controllers', 'ari_controller.rb') end |