Skip to content
Extraits de code Groupes Projets
Valider cd75c6ea rédigé par Steven Fuchs's avatar Steven Fuchs
Parcourir les fichiers

cleaner reading of unread parameter

parent 1519cdd6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -11,7 +11,7 @@ class NotificationsController < VannaController ...@@ -11,7 +11,7 @@ class NotificationsController < VannaController
def update(opts=params) def update(opts=params)
note = Notification.where(:recipient_id => current_user.id, :id => opts[:id]).first note = Notification.where(:recipient_id => current_user.id, :id => opts[:id]).first
if note if note
note.update_attributes(:unread => opts[:unread] || false ) note.update_attributes(:unread => opts[:unread].to_s == "true" )
{} {}
else else
Response.new :status => 404 Response.new :status => 404
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter