Sha256: 85e59fbebacedb7c33fd81d8ce0e8e180359a4cbb1ba15c1824a03b00cdb5412

Contents?: true

Size: 423 Bytes

Versions: 76

Compression:

Stored size: 423 Bytes

Contents

# frozen_string_literal: true

module SirTrevorRails
  module Blocks
    ##
    # Embed search results (from a browse category) into the page
    class LinkToSearchBlock < BrowseBlock
      include Displayable

      def searches
        @searches ||= parent.exhibit.searches.where(slug: item_ids).sort do |a, b|
          ordered_items.index(a.slug) <=> ordered_items.index(b.slug)
        end
      end
    end
  end
end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
blacklight-spotlight-4.3.6 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.3.5 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.3.4 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.3.3 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.3.2 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.3.1 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.3.0 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.2.0 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.1.2 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.1.1 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.1.0 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.0.3 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.0.2 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.0.1 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-4.0.0 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-3.6.0.beta10 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-3.6.0.beta9 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-3.6.0.beta8 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-3.5.0.4 app/models/sir_trevor_rails/blocks/link_to_search_block.rb
blacklight-spotlight-3.6.0.beta7 app/models/sir_trevor_rails/blocks/link_to_search_block.rb