Artificial intelligent assistant

#tag のブロック内で、最後のタグしか出力されない rails 5.2.3 htmldecoratoractive_decorator .badge.badge-info = hoge .badge.badge-warning= fuga hoge tag.div(class: 'badge badge-info') do hoge tag.div fuga, class: 'badge badge-warning' end hoge **** view = vacation.badge decorator module VacationDecorator def badge tag.div(class: 'badge badge-info') do off_type_i18n tag.div aasm_state_i18n, class: 'badge badge-warning' end end **html** <div class="badge badge-info"><div class="badge badge-warning"></div></div> block <div class="badge badge-info"></div> html <div class='badge badge-info'> <div class='badge badge-warning'></div> </div>

(
hoge +
tag.div(fuga, class: 'badge badge-warning')
).html_safe


slim ruby
slim
ruby
return
slim

ruby
concat
html_safe


[
hoge,
tag.div(fuga, class: 'badge badge-warning')
].join.html_safe


xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c7e44bde3d9427178986ff4bc61e2e94