Skip to content

Commit

Permalink
Fix test failure by using @raw_location
Browse files Browse the repository at this point in the history
Fixed the test failures by updating the `formatted_address`
method to use @raw_location. This had been overlooked in
its conversion to be compatible with ViewComponent usage
  • Loading branch information
lenikadali committed Nov 18, 2024
1 parent 9cfc8e9 commit 12a8cd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/address_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ def formatted_address
return address_lines.join(", #{tag.br}")
end

uri = URI.parse(raw_location)
uri = URI.parse(@raw_location)
"<a href='#{uri}'>#{uri.hostname}</a>"

rescue URI::InvalidURIError
raw_location
@raw_location
end
end

0 comments on commit 12a8cd1

Please sign in to comment.