Invite a friend invitation system error

I am trying to implement an invitation feature on my site. I am trying to display on each user's page a list of the people they have invited. In my invitations controller I have the following code:

def index
    @invitation =
    @emails_for_invitations = Invitation.find_all_by_sender_id(
    @referred_users = User.where(:referer =>

In my invitation view I have the following code:

<h1>Sent Invitations</h1>
    <%= for invitation in @emails_for_invitations do %>
      <li><%= invitation.recipient_email %></li>
    <% end %>

The output displayed on the site is as follows:

Why is the last line of the output occurring? I can't seem to get rid of it. There is nothing in my controller or view that is calling on this to happen. All I want to see is the list of emails.


<% for invitation in @emails_for_invitations do %>

without the equals sign "=" will get rid of the output. The reason is you tell rails to render the return value of your for loop, which happens to be each individual invitation object as it looks ...

Need Your Help

Invocation was not performed on the mock, what could be wrong here?

c# interface tdd moq

this error is trown by the following TEST. If i test the DataLayer, the database gets updated and everything works. however the mock keeps sending out this error. i have a similar test that does work

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.