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



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

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

#create_directoriesObject



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

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