Class: RestApiGenerator::ResourceGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- RestApiGenerator::ResourceGenerator
- Includes:
- Helpers
- Defined in:
- lib/generators/rest_api_generator/resource_generator.rb
Constant Summary
Constants included from Helpers
Helpers::API_CONTROLLER_DIR_PATH, Helpers::API_DOCS_DIR_PATH, Helpers::API_TEST_DIR_PATH
Instance Attribute Summary
Attributes included from Helpers
Instance Method Summary collapse
Instance Method Details
#create_service_file ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/generators/rest_api_generator/resource_generator.rb', line 18 def create_service_file create_model_files template controller_template, controller_path # Routes if ["scope"].blank? && ["father"].blank? route "resources :#{file_name.pluralize}" else log("You need to manually setup routes files for nested or scoped resource") end end |