From cd75c6ea67a4ec16e22b303f641d306c37c90d7e Mon Sep 17 00:00:00 2001 From: Steven Fuchs Date: Fri, 23 Dec 2011 11:36:20 -0500 Subject: [PATCH] cleaner reading of unread parameter --- app/controllers/notifications_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 07853afed..c2e0e5a79 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -11,7 +11,7 @@ class NotificationsController < VannaController def update(opts=params) note = Notification.where(:recipient_id => current_user.id, :id => opts[:id]).first if note - note.update_attributes(:unread => opts[:unread] || false ) + note.update_attributes(:unread => opts[:unread].to_s == "true" ) {} else Response.new :status => 404