Recommendations are automatically disabled if dismissed by user
This commit is contained in:
@@ -80,6 +80,14 @@ class ProposalsController < ApplicationController
|
||||
@tag_cloud = tag_cloud
|
||||
end
|
||||
|
||||
def disable_recommendations
|
||||
if current_user.update(recommended_proposals: false)
|
||||
redirect_to proposals_path, notice: t('proposals.index.recommendations.actions.success')
|
||||
else
|
||||
redirect_to proposals_path, error: t('proposals.index.recommendations.actions.error')
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def proposal_params
|
||||
|
||||
Reference in New Issue
Block a user