ruby on rails - iOS Push Notification connection.write error -
whenever try sending push notification rails server using gem houston, gives me error:
nomethoderror (undefined method `gsub' nil:nilclass): app/controllers/api/v1/messages_controller.rb:77:in `create'
it points on line: connection.write(notification.message) notification.message string value.
i don't know causing since occurs on notification sending code itself.
so figured out. stupid error passed wrong , came out nil. should have passed in connection.write(msg_notification.message) instead of connection.write(notification.message).
Comments
Post a Comment