Ask A Question

Notifications

You’re not receiving notifications from this thread.

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

Tolase Kelvin Adegbite asked in Rails

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.

Reply

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.

Reply

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))

Reply
Join the discussion
Create an account Log in

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

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

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