From c6a9f4a51a5199121387ca705b97a485f1f92b20 Mon Sep 17 00:00:00 2001 From: Raffael Schmid Date: Mon, 28 Jan 2013 23:34:23 +0100 Subject: [PATCH] add helper to generate urls at a single point --- app/models/notification_service.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/notification_service.rb b/app/models/notification_service.rb index 4dd08ba..cd24a73 100644 --- a/app/models/notification_service.rb +++ b/app/models/notification_service.rb @@ -8,7 +8,7 @@ class NotificationService field :api_token, :type => String field :subdomain, :type => String field :sender_name, :type => String - + embedded_in :app, :inverse_of => :notification_service validate :check_params @@ -34,4 +34,8 @@ class NotificationService def configured? api_token.present? end + + def problem_url(problem) + "http://#{Errbit::Config.host}/apps/#{problem.app.id}/problems/#{problem.id}" + end end -- libgit2 0.21.2