* Use a slightly faster call for user_id * Remove unused file * Test receive notifications functionality * Notify when receive_notifications is true * Test receiving reaction notifications * Do not notify if receive_notifications is false * Fix test for parent comment notification * Add article mute notifications feature * Remove deprecated specs * Prevent email when receive_notification is false * Update button messaging * Use RESTful /article_mutes patch request * Use parent or root article instead
10 lines
313 B
Ruby
10 lines
313 B
Ruby
class ArticleMutesController < ApplicationController
|
|
after_action :verify_authorized
|
|
|
|
def update
|
|
@article = Article.find_by(id: params[:id], user_id: current_user.id)
|
|
authorize @article
|
|
@article.update(receive_notifications: !@article.receive_notifications)
|
|
redirect_to "/dashboard"
|
|
end
|
|
end
|