Skip to content

Commit

Permalink
Fix link to sponsor
Browse files Browse the repository at this point in the history
fixes link to sponsor website from admin area, resolves #2512 by using name as param in link_to, alternatively I could set only_path: false. Also opens external link in new tab
  • Loading branch information
HelenEBates committed Dec 22, 2024
1 parent 6632e6e commit 2fcbdfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/sponsors/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.bg-light.p-3.mb-4
%dl.row
%dt= t('.website')
%dd= link_to @sponsor.website
%dd= link_to @sponsor.website, @sponsor.website, target: '_blank'

%dt= t('.address')
- if @sponsor.address.present?
Expand Down
2 changes: 1 addition & 1 deletion spec/features/admin/sponsor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
scenario 'displays all sponsor details' do
expect(page).to have_content(sponsor.name)
expect(page).to have_content(sponsor.description)
expect(page).to have_link(sponsor.website)
expect(page).to have_link(sponsor.website, href: sponsor.website)
expect(page).to have_content(sponsor.level)
expect(page).to have_content(ContactPresenter.new(sponsor.contacts.first).full_name)

Expand Down

0 comments on commit 2fcbdfa

Please sign in to comment.