Skip to content

Commit

Permalink
compress a little more
Browse files Browse the repository at this point in the history
  • Loading branch information
mccalluc committed Jan 13, 2023
1 parent b8162f5 commit cc2073c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/models/work_activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,8 @@ def body_html
changes = JSON.parse(@work_activity.message)

changes.keys.map do |field|
change = changes[field]
mapped = change.map { |value| change_value_html(value) }
values = mapped.join
"<details class='message-html'><summary class='show-changes'>#{field}</summary>#{values}</details>"
mapped = changes[field].map { |value| change_value_html(value) }
"<details class='message-html'><summary class='show-changes'>#{field}</summary>#{mapped.join}</details>"
end.join
end

Expand Down

0 comments on commit cc2073c

Please sign in to comment.