metamaps--metamaps/app/controllers/notifications_controller.rb

20 lines
453 B
Ruby
Raw Normal View History

2016-11-17 04:04:30 +00:00
class NotificationsController < ApplicationController
def index
@notifications = current_user.mailbox.notifications
respond_to do |format|
format.html
format.json { render json: @notifications.to_json }
end
end
def show
@notification = current_user.mailbox.notifications.find_by(id: params[:id])
respond_to do |format|
format.html
format.json { render json: @notification.to_json }
end
end
end