mirror of
https://github.com/diaspora/diaspora.git
synced 2026-01-10 07:38:10 -05:00
cleaner reading of unread parameter
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user