title: Rails - error messages can't be displayed
body: <p>When I send wrong email, validation can't pass but error messages in views don't be displayed :(</p>
  
  <p>I have in models:</p>
  
  <pre><code>validate :recipient_not_have_invitation, :notice =&gt; "That user have already invitation"
  
  def recipient_not_have_invitation
    errors.add :notice, 'That user have already invitation' if InvitationToGroup.find_by_recipient_email_and_group_id(recipient_email, group_id)
  end
  </code></pre>
  
  <p>in controller:</p>
  
  <pre><code>(...)
  
  if @invitation_to_group.save
    Mailer.invitation_to_group(@invitation_to_group).deliver
    redirect_to root_url, :notice =&gt; "Successfully send invitation to user #{@invitation_to_group.recipient_email}"
  else
    redirect_to new_invitation_to_group_path(:group_id =&gt;  @invitation_to_group.group_id)
  end
  </code></pre>
  
  <p>In views (invitation_to_groups/new.html.erb)</p>
  
  <pre><code>&lt;h2&gt;New Invitation to group &lt;/h2&gt;
  &lt;% if notice %&gt;
    &lt;p id="notice"&gt;&lt;%= notice %&gt;&lt;/p&gt;
  &lt;% end %&gt;
  
  &lt;%= form_for @invitation_to_group do |f| %&gt;
     &lt;% if @invitation_to_group.errors.any? %&gt;
      &lt;div id="error_explanation"&gt;
        &lt;h2&gt;&lt;%= pluralize(@invitation_to_group.errors.count, "error") %&gt; prohibited this user from being invitation:&lt;/h2&gt;
  
        &lt;ul&gt;
        &lt;% @invitation_to_group.errors.full_messages.each do |msg| %&gt;
          &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
        &lt;% end %&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>(...)</p>