Sha256: 420003641326b333530257171c47496a55d0773aa17d7524e4c54089c9ddc219

Contents?: true

Size: 498 Bytes

Versions: 1

Compression:

Stored size: 498 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 = '<notextile>'
          o << render(download)
          o << '</notextile>'
          return o.html_safe
        rescue => e
          raise e
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ecm_downloads2-1.1.1 app/helpers/ecm/downloads/download_helper.rb