这是我检索数据的声明
@week_activities = Activity.where(:weeknum => 1)
这就是我展示它的方式
<%= @week_activities.each do |d| %>
<%= d.id %>, <%= d.week %>, <%= d.day %> <br/>
<% end %>
它以我想要的方式显示我想要的东西
1, 1, Monday
2, 1, Tuesday
3, 1, Wednesday
4, 1, Thurday
5, 1, Friday
6, 1, Saturday
7, 1, Sunday
然后由于我忽略的原因,它将整个表显示为数组
[#<Activity id: 1, jog: 0, pushups: 0, situps: 0, bicycl: 0, squats: 0,
lunges: 0, foodid: 0, ccalor: 0, bcalor: 0, user_id: nil,
created_at: "2012-11-23 03:12:54", updated_at: "2012-11-23 03:12:54", week: 1,
day: "Monday"> ... and so on.
有什么原因,它显示了整个表格的内容吗?