module RecordMe::Controller
Public Instance Methods
record_me_save(filename = params[:filename])
click to toggle source
# File lib/record_me/controller.rb, line 3 def record_me_save(filename = params[:filename]) audio = request.raw_post file_with_path = RecordMe.configuration["destination"] + "/" + filename return save_file(file_with_path, audio) end
Private Instance Methods
save_file(file_with_path, audio)
click to toggle source
# File lib/record_me/controller.rb, line 12 def save_file(file_with_path, audio) File.open(file_with_path, 'w+b'){|file| file.puts audio} File.exist?(file_with_path) ? true : false end