Skip to content

Commit

Permalink
Merge pull request #2043 from projectblacklight/no-doc-id-fallback
Browse files Browse the repository at this point in the history
Remove document.id fallback from document_show_link_field helper; it …
  • Loading branch information
jcoyne authored Jan 4, 2019
2 parents c5827f5 + c2ce208 commit 4a69eba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/helpers/blacklight/configuration_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def document_show_link_field document = nil
field = fields.first if document.nil?
field ||= fields.find { |f| document.has? f }
field &&= field.try(:to_sym)
field ||= document.id

field
end
Expand Down
6 changes: 0 additions & 6 deletions spec/helpers/blacklight/configuration_helper_behavior_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@
f = helper.document_show_link_field document
expect(f).to eq :b
end

it "fallbacks on the id" do
blacklight_config.index.title_field = [:zzz, :yyy]
f = helper.document_show_link_field document
expect(f).to eq 123
end
end

describe "#view_label" do
Expand Down

0 comments on commit 4a69eba

Please sign in to comment.