Incorrect return

2

Good evening, I have a problem when it comes to pulling bank information and show it on the show.

Mycodelookslikethis:

<%[email protected]|answer|%><divclass="media">
      <div class="media-left">
        <a href="#">
          <img class="media-object" src="<%= answer.gravatar %>">
        </a>
      </div>
      <div class="media-body">
        <h4 class="media-heading"><%= answer.email %> answered:</h4>
        <%= answer.body %>
      </div>
    </div>
  </div>
  <% end %>

Thank you guys.

    
asked by anonymous 02.08.2016 / 23:15

1 answer

1

The equal sign <%= is used to validate and print information, which in this case is the object that you are iterating (answer). Just try to validate the expression by changing

<%= @question.answers.each do |answer| %>

for

<% @question.answers.each do |answer| %>
    
03.08.2016 / 05:06