Skip to content

Commit 0b97c07

Browse files
committed
feat: /dojos/activity のnoteカラムにtruncateを適用
- /dojos ページと同様に長いテキストを省略表示 - noteは60文字でtruncate(URLを含むことが多いため) - titleアトリビュートで全文を確認可能
1 parent 9cfa869 commit 0b97c07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/views/dojos/activity.html.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@
6565
</td>
6666
<td class="url-cell">
6767
<small>
68-
<span title="<%= dojo[:note] %>"><%= raw Addressable::URI.unescape(Rinku.auto_link(dojo[:note])) %></span>
68+
<span title="<%= dojo[:note] %>">
69+
<% truncated_note = truncate(dojo[:note], length: 60) %>
70+
<%= raw Addressable::URI.unescape(Rinku.auto_link(truncated_note)) %>
71+
</span>
6972
</small>
7073
</td>
7174
</tr>

0 commit comments

Comments
 (0)