Ask A Question

Notifications

You’re not receiving notifications from this thread.

Nofications screen cast

John Munyi asked in Site Feedback

Hi Chris ,

I am following the notifications screen here : https://gorails.com/episodes/in-app-navbar-notifications?autoplay=1
all is well no errors but when i create a post the notifications arent being created, any guidance ?

my code can be found here https://github.com/wolfieorama/furry-fortnight

cheers

Reply

I had a quick look at your repository and it might not be up to date because there are several things missing to create notifications.
For example the coffeescript https://github.com/excid3/gorails-episode-96/blob/master/app/assets/javascripts/notifications.js.coffee
Or the jbuilder for the Json https://github.com/excid3/gorails-episode-96/blob/master/app/views/notifications/index.json.jbuilder
Or the controller https://github.com/excid3/gorails-episode-96/blob/master/app/controllers/notifications_controller.rb

Have a look at this example that Chris provided: https://github.com/excid3/gorails-episode-96

Reply

christophe, thnks for the response but i thought to create a notification in the DB I only need the controller action for Notification.create() as per the tutorial the json part comes much later but for the Notification to be available in the db isnt it only what i have done ?

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.