test1

class NotificationController  "receiver_id = #{@session['user'].id} and touched = ‘1′ “)
     if params["delete_is_pressed"] != “YES”
       for i in 0…@message_after_action.length
         # as the touched & read values in database is of type “tinyint”, hence best practice is to use as 1 insted “1″ or 0 against “0″
         if( (@message_after_action[i][:touched] == true || @message_after_action[i][:touched] == 1) && (@message_after_action[i][:read] == false || @message_after_action[i][:read] == 0))
              @message_after_action[i].read = 1
              NotificationDetail.update(@message_after_action[i].id, {:read => true})
         end
        end
     end
    #####Code For changing mail_read flag to 1 if selected category is INVITATIONS Jan 18th
      @invitation_after_action = Invitation.find(:all,:conditions => “invitee_id = ‘#{@session['user'].id}’ and mail_touched = ‘1′ “)
      if params["delete_is_pressed"] != “YES”
       for i in 0…@invitation_after_action.length
         if( (@invitation_after_action[i][:mail_touched] == true  || @invitation_after_action[i][:mail_touched] == 1)&& (@invitation_after_action[i][:mail_read] == false || @invitation_after_action[i][:mail_read] == 0))
               @invitation_after_action[i].mail_read = 1
               Invitation.update(@invitation_after_action[i].id, {:mail_read => true})
         end
        end
     end

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.

Anti-Spam Image