【发布时间】:2013-04-16 02:10:11
【问题描述】:
我正在尝试在我的 Rails 应用程序中实现设计,但在我的 header.html.erb 中出现此语法错误
<% if user_signed_in? %>
Logged in as <strong><%= current.user.email %></strong>.
<%= link_to 'Edit profile', edit_user_registration_path %>
<%= link_to 'Logout', destroy_user_session_path, method: :delete %>
<% else %>
<%= link_to 'Sign up', new_user_registration_path %> |
<%= link_to 'Login', new_user_ssession_path %>
<% end %>
这是我收到的错误消息:
编译错误 /Users/ryanoliver/repos/joyties/app/views/layouts/application.html.erb:14: 语法错误,意外 ':',期待 ')' ...roy_user_session_path, 方法: :delete );@output_buffer.safe...
非常感谢任何帮助
谢谢
【问题讨论】: