Class: Jsonapi::ControllerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Jsonapi::ControllerGenerator
- Defined in:
- lib/generators/jsonapi/controller_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_resource ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/generators/jsonapi/controller_generator.rb', line 5 def create_resource template_file = File.join( 'app/controllers', class_path, "#{file_name.pluralize}_controller.rb" ) template 'jsonapi_controller.rb', template_file end |