Merge pull request #13 from wakeless/ruby-1-9-3
Fixes broken digitals in ruby 1.9.3
This commit is contained in:
@@ -8,11 +8,11 @@ module Spree
|
||||
if link.present? and link.digital.attachment.present?
|
||||
attachment = link.digital.attachment
|
||||
if link.authorize! and File.file?(attachment.path)
|
||||
send_file attachment.path :filename => attachment.original_filename, :type => attachment.content_type and return
|
||||
send_file attachment.path, :filename => attachment.original_filename, :type => attachment.content_type and return
|
||||
end
|
||||
end
|
||||
render :unauthorized
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user