Sha256: 5794b57f1e739120c33eee282e9766df9933759b28b67139cfce1bef6c5255b3

Contents?: true

Size: 496 Bytes

Versions: 11

Compression:

Stored size: 496 Bytes

Contents

# frozen_string_literal: true
module Bulkrax
  module ApplicationHelper
    def item_entry_path(item, e, opts = {})
      an_importer?(item) ? bulkrax.importer_entry_path(item.id, e.id, opts) : bulkrax.exporter_entry_path(item.id, e.id, opts)
    end

    def an_importer?(item)
      item.class.to_s.include?('Importer')
    end

    def coderay(value, opts)
      CodeRay
        .scan(value, :ruby)
        .html(opts)
        .html_safe # rubocop:disable Rails/OutputSafety
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bulkrax-9.0.2 app/helpers/bulkrax/application_helper.rb
bulkrax-9.0.1 app/helpers/bulkrax/application_helper.rb
bulkrax-9.0.0 app/helpers/bulkrax/application_helper.rb
bulkrax-8.2.3 app/helpers/bulkrax/application_helper.rb
bulkrax-8.2.2 app/helpers/bulkrax/application_helper.rb
bulkrax-8.3.0 app/helpers/bulkrax/application_helper.rb
bulkrax-8.2.1 app/helpers/bulkrax/application_helper.rb
bulkrax-8.2.0 app/helpers/bulkrax/application_helper.rb
bulkrax-8.1.0 app/helpers/bulkrax/application_helper.rb
bulkrax-8.0.0 app/helpers/bulkrax/application_helper.rb
bulkrax-7.0.0 app/helpers/bulkrax/application_helper.rb