Fix admin notification with relative URLs
The test was passing because it was using the rack driver, but on real browsers it wasn't generating the expected URL.
This commit is contained in:
@@ -42,7 +42,7 @@ class AdminNotification < ApplicationRecord
|
||||
def complete_link_url
|
||||
return unless link.present?
|
||||
|
||||
unless self.link[/\Ahttp:\/\//] || self.link[/\Ahttps:\/\//]
|
||||
unless link =~ /\A(http:\/\/|https:\/\/|\/)/
|
||||
self.link = "http://#{self.link}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user