Class: Gossiper::NotificationsController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#gossiper_authorization, #page, #per_page

Instance Method Details

#deliverObject



16
17
18
19
20
21
# File 'app/controllers/gossiper/notifications_controller.rb', line 16

def deliver
  notification.deliver!
  respond_with(notification) do |format|
    format.html { redirect_to :notifications, notice: t('.delivered')  }
  end
end

#indexObject



7
8
9
10
# File 'app/controllers/gossiper/notifications_controller.rb', line 7

def index
  @notifications = Notification.order('id desc').page(page).per(per_page)
  respond_with(@notifications)
end

#showObject



12
13
14
# File 'app/controllers/gossiper/notifications_controller.rb', line 12

def show
  respond_with(notification, location: :notifications)
end