Class: Lina::Generators::ApiGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Lina::Generators::ApiGenerator
- Defined in:
- lib/generators/lina/api/api_generator.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#add_routes ⇒ Object
13 14 15 16 17 |
# File 'lib/generators/lina/api/api_generator.rb', line 13 def add_routes actions.reverse.each do |action| route generate_routing_code(action) end end |
#create_controller_files ⇒ Object
9 10 11 |
# File 'lib/generators/lina/api/api_generator.rb', line 9 def create_controller_files template 'controller.rb', File.join('app/controllers', class_path, "#{file_name}_controller.rb") end |