+
+ end
+ end
+
+ def read
+ if params[:message_id]
+ id = params[:message_id]
+ @message = Message.find_by_id(id)
+ end
+ end
+
+ def mark
+ if params[:message_id]
+ id = params[:message_id]
+ message = Message.find_by_id(id)
+ message.message_read = 1
+ if message.save
+ flash[:notice] = 'Message Marked as read'
+ redirect_to :controller => 'user', :action => 'view', :display_name => @user.display_name
+ end
+ end