0
私は私のhtmlで:オブジェクトの属性を呼び出す際の追加データはどこから来ますか?
<table class="customers" summary="User customers">
<%= @customers.each do |customer| %>
<tr>
<td class="customer"><%= customer.mobile %></td>
<td class="timestamp">Added <%= time_ago_in_words(customer.created_at) %> ago.</td>
</tr>
<% end %>
</table>
データの最初の行は、読み取ります
#<Customer:0x103061018>#<Customer:0x10304c910>#<Customer:0x10304c7a8>#<Customer:0x10304c668>
期待する前に:
5234567894は1日前に追加されました。
5234567893 1日前に追加されました。
5234567892 1日前に追加されました。
データの最初の行とは何ですか、どうすればそのデータを削除できますか?代わり
<%= @customers.each do |customer| %>
の
ああ、愚かな間違い。ありがとう。 – Greg