diff --git a/app/services/visits/suggest.rb b/app/services/visits/suggest.rb index f4b419b7..b18fbbd3 100644 --- a/app/services/visits/suggest.rb +++ b/app/services/visits/suggest.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true class Visits::Suggest + include Rails.application.routes.url_helpers + attr_reader :points, :user, :start_at, :end_at def initialize(user, start_at:, end_at:) @@ -72,7 +74,7 @@ class Visits::Suggest def create_visits_notification(user) content = <<~CONTENT - New visits have been suggested based on your location data from #{Time.zone.at(start_at)} to #{Time.zone.at(end_at)}. You can review them in the <%= link_to 'Visits', visits_path %> section. + New visits have been suggested based on your location data from #{Time.zone.at(start_at)} to #{Time.zone.at(end_at)}. You can review them on the Visits page. CONTENT user.notifications.create!( diff --git a/app/views/notifications/_notification.html.erb b/app/views/notifications/_notification.html.erb index 99c4df5e..62a32b81 100644 --- a/app/views/notifications/_notification.html.erb +++ b/app/views/notifications/_notification.html.erb @@ -7,7 +7,7 @@ <% if params[:action] == 'show' %>
- <%= notification.content %> + <%= notification.content.html_safe %> <% if notification.error? %>