module Api::Fileupload::UploadedFiles
Protected Instance Methods
uploaded_file(file)
click to toggle source
# File lib/api/fileupload/uploaded_files.rb, line 13 def uploaded_file(file) if file.is_a?(Hash) Store.fetch(current_user.id, file) else file end end
uploaded_file_param(param_name = :file)
click to toggle source
# File lib/api/fileupload/uploaded_files.rb, line 21 def uploaded_file_param(param_name = :file) { param_name => [:id] } end
Private Instance Methods
clear_uploaded_files()
click to toggle source
# File lib/api/fileupload/uploaded_files.rb, line 26 def clear_uploaded_files Store.clear(current_user.id) end
response_ok?()
click to toggle source
# File lib/api/fileupload/uploaded_files.rb, line 30 def response_ok? "#{response.status}" =~ /\A2/ end