Sha256: bf8aa41255cc761747d82fff4f121ec1e18f2741f704cbc40805566a741d38da

Contents?: true

Size: 636 Bytes

Versions: 9

Compression:

Stored size: 636 Bytes

Contents

require_dependency "gossiper/application_controller"

module Gossiper
  class NotificationsController < ApplicationController
    respond_to :html

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

    def show
      respond_with(notification)
    end

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

    private
      def notification
        @notification ||= Notification.find(params[:id])
      end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gossiper-0.3.8 app/controllers/gossiper/notifications_controller.rb
gossiper-0.3.7 app/controllers/gossiper/notifications_controller.rb
gossiper-0.3.6 app/controllers/gossiper/notifications_controller.rb
gossiper-0.3.5 app/controllers/gossiper/notifications_controller.rb
gossiper-0.3.4 app/controllers/gossiper/notifications_controller.rb
gossiper-0.3.3 app/controllers/gossiper/notifications_controller.rb
gossiper-0.3.2 app/controllers/gossiper/notifications_controller.rb
gossiper-0.3.1 app/controllers/gossiper/notifications_controller.rb
gossiper-0.3.0 app/controllers/gossiper/notifications_controller.rb