Sha256: 869a2984844482c3f71ab386b50b9ee156c2e84ad27f757b381221b8753bd2c0

Contents?: true

Size: 351 Bytes

Versions: 25

Compression:

Stored size: 351 Bytes

Contents

# frozen_string_literal: true
module Zizia
  module ApplicationHelper
    def collections_for_select
      ActiveFedora::SolrService.query('has_model_ssim:Collection').map do |c|
        [c['title_tesim'][0], c['id']]
      end
    end

    def collections?
      !ActiveFedora::SolrService.query('has_model_ssim:Collection').empty?
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
zizia-2.1.0.alpha.04 app/helpers/zizia/application_helper.rb
zizia-2.1.0.alpha.03 app/helpers/zizia/application_helper.rb
zizia-2.1.0.alpha.02 app/helpers/zizia/application_helper.rb
zizia-2.1.0.alpha.01 app/helpers/zizia/application_helper.rb
zizia-2.0.0.alpha.01 app/helpers/zizia/application_helper.rb