Module: SocialStream::Controllers::MarkNotificationsRead

Extended by:
ActiveSupport::Concern
Defined in:
lib/social_stream/controllers/mark_notifications_read.rb

Overview

Common methods added to ApplicationController

Instance Method Summary collapse

Instance Method Details

#mark_notifications_readObject

Mark notifications read when following a link



12
13
14
15
16
# File 'lib/social_stream/controllers/mark_notifications_read.rb', line 12

def mark_notifications_read
  return if params[:notification_id].blank? or !user_signed_in?
  n = Notification.find(params[:notification_id])
  current_subject.mark_as_read n
end