我该如何编码,以便异常输出哪个方法和特定的联系实例是问题?
sub_message =
13 message.gsub("{FirstName}", contact.first_name).
14 gsub("{LastName}", contact.last_name).
15 gsub("{Title}", contact.title || "blank").
16 gsub("{Signature}", contact.user.signature.to_s).
17 # gsub("{Company}", contact.company_name.clear_company).
18 gsub("{Colleagues}", colleagues.to_sentence).
19 gsub("{NextWeek}", next_week.strftime("%A, %B %d")).
20 gsub("{FollowingWeek}", (Date.today + 14.days).strftime("%A, %B %d")).
21 gsub("{UserFirstName}", contact.user.first_name).
22 gsub("{UserLastName}", contact.user.last_name).
23 gsub("{City}", contact.address.city.titleize || "default city").
24 gsub("{State}", contact.address.state || "default state").
25 gsub("{Zip}", contact.address.zip || "default zip" ).
26 gsub("{Phone}", contact.phone.format_phone || "default phone" ).
27 gsub("{Street1}", contact.address.street1.titleize || "default street").
28 gsub("{Today}", (Date.today).strftime("%A, %B %d")).
29 gsub("{CustomField1}", contact.custom_field_1.to_s || "custom").
30 gsub("{PageBreak}", "p{page-break-after: always}. ")