Class: Gossiper::NotificationsController
Instance Method Summary
collapse
#gossiper_authorization, #page, #per_page
Instance Method Details
#deliver ⇒ Object
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
|
#index ⇒ Object
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
|
#show ⇒ Object
12
13
14
|
# File 'app/controllers/gossiper/notifications_controller.rb', line 12
def show
respond_with(notification, location: :notifications)
end
|