Skip to content

Commit

Permalink
Update Search#images to return an enumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Dec 10, 2015
1 parent 412e723 commit 9711549
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/spotlight/search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ def count
end

def images
documents.map do |doc|
[
return enum_for(:images) unless block_given?

documents.each do |doc|
yield [
doc.first(blacklight_config.document_model.unique_key),
doc.first(blacklight_config.index.title_field),
doc.first(blacklight_config.index.thumbnail_field)
Expand Down

0 comments on commit 9711549

Please sign in to comment.