Reputation: 4796
My code in the view file is:
<%= @tweets.each do |tweet|%>
<%= tweet.content %><br>
<% end %>
It always display, besides the tweet.content field, like follows:
My tweet text...
#<Tweet:0x10368d018>
What is wrong?? How to get ride of the second line?
Upvotes: 0
Views: 127
Reputation: 1206
Looks like you are rendering the expression in the first line. Try this:
<% @tweets.each do |tweet|%>
<%= tweet.content %><br>
<% end %>
Upvotes: 2