Class: Socializer::NotificationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/socializer/notifications_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/socializer/notifications_controller.rb', line 5

def index
  @notifications = current_user.received_notifications
end

#showObject



9
10
11
12
13
# File 'app/controllers/socializer/notifications_controller.rb', line 9

def show
  n = Notification.find(params[:id])
  read_notification(n) unless n.read?
  redirect_to stream_path(provider: :activities, id: n.activity.id)
end