Showing /sample/cmplan/app/views/layouts/application.html.erb where line #20 raised:
undefined local variable or method `root_path' for #<#<Class:0x000000064a62e8>:0x007f16117ed078>
Extracted source (around line #20):
<%= user_name_tag(current_user) %>(管理员)<% end %>
<%= link_to '首页', root_path %>
<%= link_to '编辑资料', edit_user_registration_path %>
<% if admin? %>
<%= link_to '撰写公告', edit_announcement_path %>
<% end %>
这个是我在浏览器输入 url 为‘/notifications’后出现的一个错误页面,它读取不到路由里的 root_path 和 edit_user_registration_path 等,而其它页面并没有这个问题
我猜应该是使用 gem 插件'notifications'后,我没有正确设置什么东西吧?
我是看 Ruby-China 用到了这个管理消息推送的插件后也试着使用一下。
请问我该怎么解决这个问题呢?