Skip to main content

I'm having issues with in-app notifications on my App

Rails • Asked by Tolase Kelvin Adegbite

Hello! Can someone please enlighten me on how to create notifications (In-app) for this type of routes
I want to display notifications when comments are made on episodes. This worked well when i did for genres and stories.

resources :genres do 
    resources :stories do
        resources :episodes do
            resources :comments
        end
    end
end

I actually want notifications for comments. Whwn i tried out the In-App notification tutorial on this website, i got an error undefined route "episode_path" in the** index.html.jbuilder file**, and i think i am not setting the notification URL well.
Help a friend.
Thanks.


Run rake routes or 5.x rails routes, and check how the routes looks like. Based on above routes files, it's defintely not episode_path.


Thanks for your response man. I did... something like this:

json.url genre_story_episode_path(@genre, @story, episode.id)(notification.notifiable.episode, anchor: dom_id(notification.notifiable))


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.