scinote-web/app/controllers/user_notifications_controller.rb
2016-09-29 14:49:58 +02:00

28 lines
609 B
Ruby

class UserNotificationsController < ApplicationController
def recent_notifications
@recent_notifications = UserNotification.recent_notifications(current_user)
respond_to do |format|
format.json do
render json: {
html: render_to_string(
partial: 'recent_notifications.html.erb'
)
}
end
end
end
def unseen_notification
@number = UserNotification.unseen_notification(current_user)
respond_to do |format|
format.json do
render json: {
notificationNmber: @number
}
end
end
end
end