Skip to content

Commit

Permalink
Fix bad link
Browse files Browse the repository at this point in the history
  • Loading branch information
iHiD committed Nov 4, 2024
1 parent 818f4a2 commit f942c4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/about/partners/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
%p= raw partner.support_html
- perk = partner.perks.active.first
- if perk
= render ViewComponents::ProminentLink.new("Learn more", perk_path(perk))
= render ViewComponents::ProminentLink.new("Learn more", partner_path(partner))
.supporter
= icon "chicago", "University of Chicago", category: :partners, css_class: "logo chicago"
%p
Expand Down
7 changes: 3 additions & 4 deletions scripts/partners/codecrafters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

advert_attributes = {
url: "https://app.codecrafters.io/join?via=Exercism",
markdown: "Want to master advanced JavaScript? **Get 20% off** a ZTM annual membership!",
markdown: "Ready to put your newfound language skills into use? **Get 40% off** CodeCrafter's real-world proficiency projects!",
}

partner = Partner.find_or_create_by!(slug: slug) { |p| p.attributes = partner_attributes }
Expand All @@ -55,11 +55,10 @@
else
partner.perks.create!(perk_attributes.merge(status: :pending))
end
=begin
advert = partner.adverts.select{|a| a.track_slugs.include?("javascript")}.first

advert = partner.adverts.first
if advert
advert.update!(advert_attributes)
else
partner.adverts.create!(advert_attributes.merge(status: :pending))
end
=end

0 comments on commit f942c4f

Please sign in to comment.