app/controllers/neofiles/files_controller.rb in neofiles-1.1.3 vs app/controllers/neofiles/files_controller.rb in neofiles-1.1.4
- old
+ new
@@ -11,10 +11,11 @@
def show
file = Neofiles::File.find params[:id]
if file.is_a? Neofiles::Image
- redirect_to neofiles_image_path(params) and return
+ options = params.except(:action, :controller, :id)
+ redirect_to neofiles_image_path(options), status: 301 and return
end
send_file_headers!({
filename: CGI::escape(file.filename),
type: file.content_type,