Skip to content

Commit

Permalink
Use the return of the conditional for variable assignment and comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Jul 17, 2024
1 parent 090a0a3 commit 75852c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/controllers/concerns/documentation_controller_branding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ def documentation_url(section = nil, options = {})
end
if url.empty?
upstream_url = super(section, options)
if (upstream_url =~ /redhat.com/)
url = upstream_url
else
url = "#{ForemanThemeSatellite.documentation_root}/administering_red_hat_satellite"
end
url = if (upstream_url =~ /redhat.com/)
upstream_url
else
"#{ForemanThemeSatellite.documentation_root}/administering_red_hat_satellite"
end
end
url
end
Expand Down

0 comments on commit 75852c8

Please sign in to comment.