Sha256: d220908688af7a849abdd2bffe29e3f638da1a7282d8c94a0db9779b70c5b467
Contents?: true
Size: 600 Bytes
Versions: 23
Compression:
Stored size: 600 Bytes
Contents
# frozen_string_literal: true class Volumes < BaseClass include Praxis::Controller implements ApiResources::Volumes include Concerns::BasicApi before actions: [:show] do |controller| # puts "before action for volumes" end def index volumes = Volume::Collection.example response.body = volumes.collect(&:render) response.headers['Content-Type'] = 'application/vnd.acme.volumes' response end def show(*) response.body = JSON.pretty_generate(Volume.example.render) response.headers['Content-Type'] = 'application/vnd.acme.volume' response end end
Version data entries
23 entries across 23 versions & 1 rubygems