我有一个简单的控制器,def index
具有以下代码:
@companies = Company.all
respond_to do |format|
format.html
end
但是在视图中,companies
在显示所有错误后,我会附加这些错误:
[#<Company id: 4, title: "Testing #1(1)", created_at: "2013-02-05 19:14:04", updated_at: "2013-02-05 19:14:04">, #<Company id: 7, title: "Testing #1 1", created_at: "2013-02-05 19:34:48", updated_at: "2013-02-05 19:34:48">]
更新了视图代码:
= @companies.each do |company|
%li
.box
.c
%h2
= link_to company.title, company