我有以下代码以显示用户的一些记录:
= @kid.educations.each do |education|
= education.studies_centre
%br
= education.city_and_country
%br
%small
= education.academic_qualification
%hr
%br
= @kid.certificates.each do |certificate|
= certificate.certificate
%br
= certificate.city_and_country
%br
%small
= certificate.description
%hr
%br
= @kid.works.each do |work|
= work.company
%br
= work.city_and_country
%br
%small
= work.description
%hr
%br
但是在每个记录之后,我都会得到单词true,如下图所示:
我该怎么做才能解决这个问题。在此先感谢您的帮助
答案 0 :(得分:5)
而不是
= @kid.educations.each do |education|
你应该:
- @kid.educations.each do |education|
等。