I followed the https://www.sitepoint.com/rails-and-actioncable-adding-advanced-features tutorial, but it says:
NameError in PersonalMessagesController#create uninitialized constant PersonalMessage::NotificationBroadcastJob
after_create_commit do
conversation.touch
NotificationBroadcastJob.perform_later(self)
end
end
The above error appears when I submit, but when I go back I get a message.
So I deleted code:
after_create_commit do
conversation.touch
NotificationBroadcastJob.perform_later(self)
end
end
and tried to run it. I did not see the same error, but this time I can not chat live.
I followed the tutorial faithfully. I do not know why two problems arise. I need help.
my github : https://github.com/sangyeol-kim/stackoverflow_ask_ac2
尝试修复文件名notifications_broadcast_job.rb-> notification_broadcast_job.rb
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.