Class: Api::V1::CategoriesController

Inherits:
ApplicationController
  • Object
show all
Includes:
Gemgento::Api::V1::Base
Defined in:
app/controllers/gemgento/api/v1/categories_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



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

#showObject



9
10
11
# File 'app/controllers/gemgento/api/v1/categories_controller.rb', line 9

def show
  @category = Category.find(params[:id])
end