scube-server/app/controllers/api/sounds_controller.rb
2015-05-02 00:24:30 +00:00

17 lines
264 B
Ruby

module API
class SoundsController < ApplicationController
before_action :set_sound, only: :show
def show
send_file sound.path, type: sound.mime_type
end
private
def set_sound
@sound = Sound.find(params[:id])
end
end
end