Skip to content
Extraits de code Groupes Projets
Valider ae582e45 rédigé par Lukas Matt's avatar Lukas Matt
Parcourir les fichiers

Add toggle_chat_privilege to aspect controller

parent 4d14e7d3
Branches
Étiquettes
Aucune requête de fusion associée trouvée
......@@ -78,6 +78,14 @@ class AspectsController < ApplicationController
render :json => { :id => @aspect.id, :name => @aspect.name }
end
def toggle_chat_privilege
@aspect = current_user.aspects.where(:id => params[:aspect_id]).first
@aspect.chat_enabled = !@aspect.chat_enabled
@aspect.save
render :nothing => true
end
def toggle_contact_visibility
@aspect = current_user.aspects.where(:id => params[:aspect_id]).first
......@@ -102,6 +110,6 @@ class AspectsController < ApplicationController
end
def aspect_params
params.require(:aspect).permit(:name, :contacts_visible, :order_id)
params.require(:aspect).permit(:name, :contacts_visible, :chat_enabled, :order_id)
end
end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter