-1
Die Arbeits ERB vor dem convert:Fehler nach der Migration von ERB zu HAML
<table class="tabularData tabularData--tableInner">
<tbody>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.account_number'), width: "180")
concat content_tag(:td, consumer.account_number)
end if consumer.account_number %>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.paybyvouchers_id'))
concat content_tag(:td, consumer.paybyvouchers_id)
end if consumer.paybyvouchers_id %>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.created_on'), width: "180")
concat content_tag(:td, display_date(consumer.created_at)[:defaultFormat])
end %>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.date_of_birth'))
concat content_tag(:td, display_date(consumer.date_of_birth)[:defaultFormat])
end %>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.age'))
concat content_tag(:td, consumer.age.value)
end %>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.preferred_language'))
concat content_tag(:td, consumer.language.name)
end %>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.country_of_nationality'))
concat content_tag(:td, consumer.country_of_nationality.name)
end %>
<%= content_tag :tr do
content_tag(:td, t('consumer.labels.address')) +
content_tag(:td) do
concat consumer.address_line_1
if consumer.address_line_2.present?
concat tag(:br, nil, true)
concat consumer.address_line_2
end
concat tag(:br, nil, true)
concat consumer.postcode
concat tag(:br, nil, true)
concat consumer.city
if consumer.state.present?
concat tag(:br, nil, true)
concat consumer.state
end
concat tag(:br, nil, true)
concat consumer.country.name
end
end %>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.primary_phone_number'))
concat content_tag(:td, display_phone_number(consumer.primary_isd_code, consumer.primary_phone_number))
end %>
<%= content_tag :tr do
concat content_tag(:td, t('consumer.labels.secondary_phone_number'))
concat content_tag(:td, display_phone_number(consumer.secondary_isd_code, consumer.secondary_phone_number))
end if consumer.secondary_phone_number %>
</tbody>
</table>
Nicht HAML nach dem convert arbeiten:
und der Fehler:/Users/app/views/shared/_consumer_personal_details_table.html.haml: 3: Syntaxfehler, unerwarteter TIDENTIFIER, erwartet keyword_end ..._ number '), width: "180") concat content_tag (: td, consumer.ac ... ...^
%table.tabularData.tabularData--tableInner
%tbody
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.account_number'), width: "180") |
concat content_tag(:td, consumer.account_number) |
end if consumer.account_number |
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.paybyvouchers_id')) |
concat content_tag(:td, consumer.paybyvouchers_id) |
end if consumer.paybyvouchers_id |
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.created_on'), width: "180") |
concat content_tag(:td, display_date(consumer.created_at)[:defaultFormat]) |
end |
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.date_of_birth')) |
concat content_tag(:td, display_date(consumer.date_of_birth)[:defaultFormat]) |
end |
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.age')) |
concat content_tag(:td, consumer.age.value) |
end |
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.preferred_language')) |
concat content_tag(:td, consumer.language.name) |
end |
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.country_of_nationality')) |
concat content_tag(:td, consumer.country_of_nationality.name) |
end |
= content_tag :tr do |
content_tag(:td, t('consumer.labels.address')) + |
content_tag(:td) do |
concat consumer.address_line_1 |
if consumer.address_line_2.present? |
concat tag(:br, nil, true) |
concat consumer.address_line_2 |
end |
concat tag(:br, nil, true) |
concat consumer.postcode |
concat tag(:br, nil, true) |
concat consumer.city |
if consumer.state.present? |
concat tag(:br, nil, true) |
concat consumer.state |
end |
concat tag(:br, nil, true) |
concat consumer.country.name |
end |
end |
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.primary_phone_number')) |
concat content_tag(:td, display_phone_number(consumer.primary_isd_code, consumer.primary_phone_number)) |
end |
= content_tag :tr do |
concat content_tag(:td, t('consumer.labels.secondary_phone_number')) |
concat content_tag(:td, display_phone_number(consumer.secondary_isd_code, consumer.secondary_phone_number)) |
end if consumer.secondary_phone_number