sanitize bug fix

This commit is contained in:
Alexander Meindl 2016-01-31 11:38:40 +01:00
parent 48c18106cd
commit 72b9ff5ac0

View File

@ -6,7 +6,7 @@ class GarfieldController < ApplicationController
before_action :require_login
def show
filename = sanitize(params[:name])
filename = ActionController::Base.helpers.sanitize(params[:name])
local_path = "#{Rails.root}/tmp/_garfield_#{filename}.jpg"
send_file(local_path, disposition: 'inline', type: 'image/jpeg', x_sendfile: true)
end