我没有通知它使用这个网站:https://www.devwalks.com/lets-build-instagram-part-6-notifications/Ruby on Rails的通知用户编辑
我必须在每一页上的导航栏的通知。
一切工作正常,但是当我去编辑用户谁拥有一个或多个通知我得到的问题:
ActionView::MissingTemplate in Devise::Registrations#edit
Showing
/home/michal/mypage/app/views/notifications/_notification_dropdown.html.erb哪里线#11提出:
Missing partial devise/notifications/_notification with {:locale=>
[:en], :formats=>[:html, :text, :js, :css, :ics, :csv, :vcf, :png,
:jpeg, :gif, :bmp, :tiff, :svg, :mpeg, :xml, :rss, :atom, :yaml,
:multipart_form, :url_encoded_form, :json, :pdf, :zip, :gzip],
:variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby,
:coffee, :jbuilder, :haml]}. Searched in:
* "/home/michal/demoty/app/views"
* "/home/michal/.rvm/gems/ruby-2.4.0/gems/mailboxer-
0.15.1/app/views"
* "/home/michal/.rvm/gems/ruby-2.4.0/gems/rails_admin-
1.1.1/app/views"
* "/home/michal/.rvm/gems/ruby-2.4.0/gems/kaminari-0.17.0/app/views"
* "/home/michal/.rvm/gems/ruby-2.4.0/gems/devise-4.2.1/app/views"
#11线
<%= render current_user.notifications.order('created_at DESC').last(5) %>
当我删除字“渲染”从这条线我没有得到这个问题,但在通知我得到:
通知ID:12,user_id:5,notifications_by_id:2,post_id:17,标识符:63,notice_type:“评论”,阅读:真实,created_at: “2017年8月7日8时42分04秒”,的updated_at: “2017年8月7日9时02分10秒”
代替:
用户1有评论您的文章