Sha256: 6a2a37cc4c07dcd410c2cae93d3ca2eb33ed2fbdda2c3b12ed04694174f7bcd8

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 Bytes

Contents

module Ecm::Downloads
  module DownloadHelper
    def render_download(download_name, options = {})
      download = Download.where(:name => download_name).first.decorate
      if download.nil?
        I18n.t('ecm.downloads.download.messages.not_found', :name => download_name)
      else
        begin
          o = Ecm::Downloads::Configuration.prevent_textile_rendering_in_html ? '<notextile>' : ''
          o << render(download)
          o << '</notextile>' if Ecm::Downloads::Configuration.prevent_textile_rendering_in_html
          return o.html_safe
        rescue => e
          raise e
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ecm_downloads2-1.2.2 app/helpers/ecm/downloads/download_helper.rb
ecm_downloads2-1.2.1 app/helpers/ecm/downloads/download_helper.rb
ecm_downloads2-1.2.0 app/helpers/ecm/downloads/download_helper.rb