Class: Api::V1::CategoriesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Api::V1::CategoriesController
- Includes:
- Gemgento::Api::V1::Base
- Defined in:
- app/controllers/gemgento/api/v1/categories_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 |
# File 'app/controllers/gemgento/api/v1/categories_controller.rb', line 5 def index @categories = Category.all.page(@page[:number]).per(@page[:size]) end |
#show ⇒ Object
9 10 11 |
# File 'app/controllers/gemgento/api/v1/categories_controller.rb', line 9 def show @category = Category.find(params[:id]) end |