Class: ApiV2Generator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/api_v2/api_v2_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_routesObject


8
9
10
# File 'lib/generators/api_v2/api_v2_generator.rb', line 8

def add_routes
  json_route "jsonapi_resources :#{underscores}"
end

#create_directoriesObject


4
5
6
# File 'lib/generators/api_v2/api_v2_generator.rb', line 4

def create_directories
  directory '.', './'
end