mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-09-18 22:34:56 +09:00
Hello world
First open source release of Campfire 🎉
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class Users::PushSubscriptions::TestNotificationsController < ApplicationController
|
||||
before_action :set_push_subscription
|
||||
|
||||
def create
|
||||
@push_subscription.notification(title: "Campfire Test", body: Random.uuid, path: user_push_subscriptions_url).deliver
|
||||
redirect_to user_push_subscriptions_url
|
||||
end
|
||||
|
||||
private
|
||||
def set_push_subscription
|
||||
@push_subscription = Current.user.push_subscriptions.find(params[:push_subscription_id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user