Skip to content

Commit

Permalink
Remove noop location_link method
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Feb 22, 2024
1 parent a83e172 commit a1c9fe9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
4 changes: 1 addition & 3 deletions app/views/catalog/_stackmap_link.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
<%= link_to t('blacklight.tools.find_it').html_safe, stackmap_link(document,location), { :data => { blacklight_modal: "trigger" }, :class => "btn btn-xs stackmap-find-it" } %>
<% end %>
<strong class="<%=location_name_class%>">
<% if location.location_link.present? %>
<%= link_to location.name, location.location_link %>
<% elsif stackmapable%>
<% if stackmapable %>
<%= link_to location.name, stackmap_link(document,location), { :data => { blacklight_modal: "trigger" } } %>
<% else %>
<%= location.name %>
Expand Down
3 changes: 0 additions & 3 deletions lib/holdings/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ def bound_with?
items.any?(&:bound_with?)
end

# Intentionally left blank
def location_link; end

def present?
any_items? || any_mhlds? || bound_with?
end
Expand Down
12 changes: 0 additions & 12 deletions spec/lib/holdings/location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@
end
end

describe '#location_link' do
subject(:location_link) { location.location_link }

context 'with non-external location' do
let(:location) { described_class.new("GRE-STACKS") }

it 'does not provide a link' do
expect(location_link).to be_nil
end
end
end

describe "#items" do
subject(:items) { location.items }

Expand Down

0 comments on commit a1c9fe9

Please sign in to comment.