Module: ToggleSubscriptionAction

Extended by:
ActiveSupport::Concern
Included in:
Projects::IssuesController, Projects::LabelsController, Projects::MergeRequestsController
Defined in:
app/controllers/concerns/toggle_subscription_action.rb

Instance Method Summary collapse

Instance Method Details

#toggle_subscriptionObject


4
5
6
7
8
9
10
# File 'app/controllers/concerns/toggle_subscription_action.rb', line 4

def toggle_subscription
  return unless current_user

  subscribable_resource.toggle_subscription(current_user)

  render nothing: true
end