cleaner reading of unread parameter
This commit is contained in:
parent
1519cdd672
commit
cd75c6ea67
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue