Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
removing useless link and adding error explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
jkamenik committed Jul 18, 2011
1 parent 92ea497 commit 6acfe9f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions app/views/entries/index.html.erb
@@ -1,5 +1,16 @@
<h1>Food for <%= todays_date %></h1>

<% if @entry.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@entry.errors.count, "error") %> prohibited this entry from being saved:</h2>

<ul>
<% @entry.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<p id="notice"><%= params[:notice] %></p>

<table class=food>
Expand All @@ -16,7 +27,3 @@
<%= render 'form' %>
</table>

<br />

<%= link_to 'New Entry', new_entry_path %>

0 comments on commit 6acfe9f

Please sign in to comment.