Module: Restaurant
- Defined in:
- lib/restaurant/router.rb,
lib/restaurant/actions.rb,
lib/restaurant/railtie.rb,
lib/restaurant/version.rb
Overview
Define routes and a controller.
Examples
# config/routes.rb
Restaurant::Router.route(self)
1. Define ResourcesController if not defined
2. Define these routes
GET /:resources -> reosurces#index
GET /:resources/:id -> resources#show
POST /:resources -> resources#create
PUT /:resources/:id -> resources#update
DELETE /:resources/:id -> resources#destroy
# config/routes.rb
namespace :v1 do
Restaurant::Router.route(self)
end
1. Define V1::ResourcesController if not defined
2. Define these routes
GET /v1/:resources -> v1/reosurces#index
GET /v1/:resources/:id -> v1/resources#show
POST /v1/:resources -> v1/resources#create
PUT /v1/:resources/:id -> v1/resources#update
DELETE /v1/:resources/:id -> v1/resources#destroy
Defined Under Namespace
Modules: Actions Classes: Railtie, Router
Constant Summary collapse
- VERSION =
"0.1.4"