From 77fc40d4049bfcd4cef13d3eba359ddd9b23ed17 Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Sun, 22 May 2011 14:59:04 -0700 Subject: [PATCH] add application helper to notification helper spec, made the link an object_link rather than status_message_link --- app/helpers/notifications_helper.rb | 2 +- spec/helpers/notifications_helper_spec.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index f7d43f196..f6686b60a 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -25,7 +25,7 @@ module NotificationsHelper elsif note.instance_of?(Notifications::Liked) post = note.target if post - "#{translation(target_type, post.author.name)} #{link_to t('notifications.post'), status_message_path(post), 'data-ref' => post.id, :class => 'hard_object_link'}".html_safe + "#{translation(target_type, post.author.name)} #{link_to t('notifications.post'), object_path(post), 'data-ref' => post.id, :class => 'hard_object_link'}".html_safe else t('notifications.liked_post_deleted') end diff --git a/spec/helpers/notifications_helper_spec.rb b/spec/helpers/notifications_helper_spec.rb index 3f33915dd..bff5582ee 100644 --- a/spec/helpers/notifications_helper_spec.rb +++ b/spec/helpers/notifications_helper_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' describe NotificationsHelper do + include ApplicationHelper before do @user = Factory(:user) @person = Factory(:person)