Skip to content

Commit b847c3b

Browse files
committed
Show and truncate plain text descriptions for offers and requests list items
1 parent ac32636 commit b847c3b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/views/better_together/joatu/offers/_offer_list_item.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<%= t('better_together.joatu.by', default: 'by') %> <%= joatu_offer.creator&.name || joatu_offer.creator&.to_s %> |
77
<%= l(joatu_offer.created_at, format: :long) if joatu_offer.created_at %>
88
</div>
9-
<p class="mb-0"><%= truncate(joatu_offer.description.to_s, length: 100) %></p>
9+
<p class="mb-0"><%= truncate(joatu_offer.description.to_plain_text, length: 100) %></p>
1010
<div class="mt-1">
1111
<% joatu_offer.categories.first(3).each do |cat| %>
1212
<span class="badge bg-light text-dark border"><%= cat.name %></span>

app/views/better_together/joatu/requests/_request_list_item.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<%= t('better_together.joatu.by', default: 'by') %> <%= request_model.creator&.name || request_model.creator&.to_s %> |
77
<%= l(request_model.created_at, format: :long) if request_model.created_at %>
88
</div>
9-
<p class="mb-0"><%= truncate(request_model.description.to_s, length: 100) %></p>
9+
<p class="mb-0"><%= truncate(request_model.description.to_plain_text, length: 100) %></p>
1010
<div class="mt-1">
1111
<% request_model.categories.first(3).each do |cat| %>
1212
<span class="badge bg-light text-dark border"><%= cat.name %></span>

0 commit comments

Comments
 (0)