Sha256: 696a09eaac6803c54d2c678f361480717dc8a477df42ab760d8ff0dc75e0acbc

Contents?: true

Size: 724 Bytes

Versions: 3

Compression:

Stored size: 724 Bytes

Contents

module Ecm::Downloads
  module DownloadCategoryHelper
    def render_download_category(download_category_name, options = {})
      download_category = DownloadCategory.where(:name => download_category_name).first.decorate
      if download_category.nil?
        I18n.t('ecm.downloads.download_category.messages.not_found', :name => download_category_name)
      else
        begin
          o = Ecm::Downloads::Configuration.prevent_textile_rendering_in_html ? '<notextile>' : ''
          o << render(download_category)
          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_category_helper.rb
ecm_downloads2-1.2.1 app/helpers/ecm/downloads/download_category_helper.rb
ecm_downloads2-1.2.0 app/helpers/ecm/downloads/download_category_helper.rb