这让我错过了一个错过tIDENTIFIER的错误。似乎看不出有什么问题
<%= link_to_if(customer.try(:company_id).try(:blank?), "Company: #{@company.find(customer[:company_id].name}", { controller => 'companies', action => 'show', id => customer.company_id }) %>
答案 0 :(得分:0)
<%= link_to_if(customer.try(:company_id).try(:blank?), "Company: #{@company.find(customer[:company_id]).name}", { controller => 'companies', action => 'show', id => customer.company_id }) %>
此处缺少@ company.find(客户[:company_id] .name
)