私はそれがこのサイトを使用して通知をした:https://www.devwalks.com/lets-build-instagram-part-6-notifications/ルビーオンレールの通知ユーザーの編集
私はすべてのページのナビゲーションバーでの通知を持っています。
すべてが正常に動作しますが、私は、1つのまたは複数の通知を持っているユーザーを編集するために行くとき、私は問題を取得:
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、notified_by_id:2、post_id:17、identifier:63、notice_type:本当、のcreated_at:読んで "2017年8月7日8時42分04秒" を、updated_atの: "2017年8月7日9時02分10秒"
の代わり:
User1はあなたのポストをコメントしてい