所以我有一些循环正在进行,但我试图组织信息的显示方式。
我为样式表使用引导程序。
这是循环:
<% @users.each do |i| %>
<h3><%= i.firstname %><%= i.lastname %></h3>
Birthday: <%= i.dateofbirth %><br />
Address: <%= i.address %><br />
City: <%= i.city %><br />
Province: <%= i.province %><br />
Phone Number: <%= i.phonenumber %><br />
Service Provider: <%= i.serviceprovider %><br />
Gender: <%= i.gender %><br />
Languages: <%= i.languages %><br />
<% end %>
<% @apps.each do |f| %>
<h3>School Information</h3>
Highschool: <%= f.highschool %><br />
Address: <%= f.highschool_address %><br />
City: <%= f.highschool_city %><br />
Province: <%= f.highschool_province %><br />
Postal Code: <%= f.highschool_postalcode %><br />
<h4>Post Secondary Schools of Interest</h4>
<% f.postsecondaries.each do |ps| %>
Post Secondary Name: <%= ps.postsecondary %><br />
Address: <%= ps.postsecondary_address %><br />
City: <%= ps.postsecondary_city %><br />
Province: <%= ps.postsecondary_province %><br />
Postal Code: <%= ps.postsecondary_postalcode %><br />
Country: <%= ps.postsecondary_country %><br />
Program: <%= ps.postsecondary_program %><br />
Faculty: <%= ps.postsecondary_faculty %><br />
Status: <%= ps.postsecondary_status %><br />
<% end %>
<h3>Grades</h3>
<% f.grades.each do |grade| %>
<br />Course: <%= grade.course %><br />
Grade: <%= grade.course_grade %>
<% end %>
<h3>Extracurricular Activities</h3>
<% f.extra_activities.each do |e| %>
Activity: <%= e.activity %><br />
Position: <%= e.activity_position %><br />
Dates: <%= e.activity_dates %><br />
Times Per Week: <%= e.activity_timeperweek %><br />
Contact Name: <%= e.activity_contact %><br />
Contact Position: <%= e.activity_contact_position %><br />
Contact Phone Number: <%= e.activity_contact_phonenumber %><br />
Contact Email: <%= e.activity_contact_email %><br />
Description: <%= e.activity_description %>
<% end %>
<h3>Paragraph</h3>
Recall a time... <%= f.recall_a_time %><br />
Description: <%= f.paragraph_description %>
<br />Recall a time... <%= f.recall_a_time_two %><br />
Description: <%= f.paragraph_description_two %>
<br />Recall a time... <%= f.recall_a_time_three %><br />
Description: <%= f.paragraph_description_three %>
<% end %>
我无法将学校信息发布在存储用户信息的同一引导程序中。