app/helpers/ecm/downloads/download_helper.rb in ecm_downloads2-1.1.0 vs app/helpers/ecm/downloads/download_helper.rb in ecm_downloads2-1.1.1
- old
+ new
@@ -1,12 +1,19 @@
module Ecm::Downloads
module DownloadHelper
def render_download(download_name, options = {})
- download = Download.where(:name => download_name).first
+ download = Download.where(:name => download_name).first.decorate
if download.nil?
I18n.t('ecm.downloads.download.messages.not_found', :name => download_name)
else
- render download
+ begin
+ o = '<notextile>'
+ o << render(download)
+ o << '</notextile>'
+ return o.html_safe
+ rescue => e
+ raise e
+ end
end
end
end
end
\ No newline at end of file