Sha256: 30738fcc8029eba32d0a4e473720ede7d28c8eba863890c45e215b1a531aedbd
Contents?: true
Size: 478 Bytes
Versions: 19
Compression:
Stored size: 478 Bytes
Contents
module Spina module Api class ResourcesController < ApiController include Paginable def index resources = Resource.order(:id) render json: Spina::Api::ResourceSerializer.new(*pagination(resources)).serializable_hash.to_json end def show @resource = Resource.find(params[:id]) render json: Spina::Api::ResourceSerializer.new(@resource).serializable_hash.to_json end end end end
Version data entries
19 entries across 19 versions & 1 rubygems