Sha256: 966070c91712492dd9cdb09a29202637d8217ea1fc02f42977dcdc15f247432b

Contents?: true

Size: 541 Bytes

Versions: 17

Compression:

Stored size: 541 Bytes

Contents

module Users
  class NotificationsController < PgEngine.config.users_controller
    # TODO: authorize
    def mark_as_unseen
      notification = Noticed::Notification.find(params[:id])
      notification.mark_as_unseen!
      head :ok
    end

    def mark_as_seen
      # No handleo errores porque no debería fallar, y si falla
      # se notifica a rollbar y al user no le pasa nada
      notifications = Noticed::Notification.where(id: params[:ids].split(','))
      notifications.each(&:mark_as_seen!)
      head :ok
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pg_rails-7.6.23 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.22 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.22.pre.3 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.22.pre.2 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.22.pre.1 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.11 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.10 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.9 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.8 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.7 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.6 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.5 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.4 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.3 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.2 pg_engine/app/controllers/users/notifications_controller.rb
pg_rails-7.6.21.pre.1 pg_engine/app/controllers/users/notifications_controller.rb