1
我如何下,如果條件在HTML中,僞代碼,我想實現以下目標:如果html.erb條件軌
if @time.status is pending
place edit and delete below the message
else
not just display
end
這是我當前的代碼:
<% @value.each do |s| %>
<p><strong>Message:</strong>
<%= s.message %>
</p>
<p><strong>Date</strong>
<%= s.date %>
</p>
<p><strong>Status:</strong>
<%= s.status %>
</p>
<p>
<%= link_to 'Edit', value(), %>
<%= link_to 'Delete', value(), %>
</p>