Add sound/show action (FIXME: need tests!)
This commit is contained in:
7
app/controllers/api/sounds_controller.rb
Normal file
7
app/controllers/api/sounds_controller.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class Api::SoundsController < Api::ApplicationController
|
||||
# FIXME: add some tests!
|
||||
def show
|
||||
sound = Sound.find params[:id]
|
||||
send_file sound.path, :type => sound.mime_type
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user