We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
I am trying to load a partial in the header and it doesn't load. If I put the code in the view, it does.
Header partial: <%= render_async notifications.notifications_count_path %>
<%= render_async notifications.notifications_count_path %>
Controller (notifications engine, maybe this is not ok):
def notifications_count @notif_count = Notification.unread_count(current_user) render partial: 'layouts/notifications_count' end Inside my routes:
def notifications_count @notif_count = Notification.unread_count(current_user) render partial: 'layouts/notifications_count' end
Notifications::Engine.routes.draw do get :notifications_count, controller: :notifications end
Am I doing something wrong?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hey, @deikka, thanks for submitting an issue! Did you try adding <%= content_for :render_async %> inside <header> tag?
<%= content_for :render_async %>
<header>
Sorry, something went wrong.
wow, that's fast! Thanks for the tip, now it's working :) The conten_for was in application.html.erb inside head tag.
thanks again!!
No branches or pull requests
Hi!
I am trying to load a partial in the header and it doesn't load. If I put the code in the view, it does.
Header partial:
<%= render_async notifications.notifications_count_path %>
Controller (notifications engine, maybe this is not ok):
def notifications_count @notif_count = Notification.unread_count(current_user) render partial: 'layouts/notifications_count' end
Inside my routes:
Notifications::Engine.routes.draw do get :notifications_count, controller: :notifications end
Am I doing something wrong?
Thanks in advance!
The text was updated successfully, but these errors were encountered: