Class: ActionPushWeb::SubscriptionsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/action_push_web/subscriptions_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



3
4
5
6
7
8
# File 'app/controllers/action_push_web/subscriptions_controller.rb', line 3

def create
  ApplicationPushSubscription.create_with(user_agent: request.user_agent).
    create_or_find_by!(push_subscription_params)

  head :ok
end