Skip to content

Commit 3e5794c

Browse files
committed
rubocop fix
1 parent fcf8440 commit 3e5794c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/helpers/application_helper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ def sort_link_to(name, column)
2222

2323
def safe_url(url)
2424
uri = URI.parse(url)
25-
if uri.scheme && !["http", "https"].include?(uri.scheme)
26-
"#" # or some default safe URL
25+
if uri.scheme && ["http", "https"].exclude?(uri.scheme)
26+
"#"
2727
else
2828
url
2929
end
3030
rescue URI::InvalidURIError
31-
"#" # or some default safe URL
31+
"#"
3232
end
3333
end

0 commit comments

Comments
 (0)