Another Remark hyperlink and finally figured out link_to() smh

This commit is contained in:
swaggboi 2022-08-23 21:48:30 -04:00
parent 9169d8b8cd
commit d9bbcf6bae
2 changed files with 4 additions and 7 deletions

View File

@ -24,14 +24,9 @@ Run the tests locally (against development environment)
## TODOs
1. Hyperlink to remarks form
1. Is there something I can do about route names?
1. I'm kinda hardcoding the single-thread view `link_to` in the
templates because I cannot for the life of me figure out how to use
`url_for` to populate the `thread_id` placeholder. Probably need to
clean-up the HTML too, just used `<span>` cuz I didn't know what
else to use
1. Tests for remark form
1. Return the last remark with remark form
1. Marked some items for clean up with comments
1. Method names may need to be shortened
1. Change 'view' to something like 'list' or 'browse'

View File

@ -5,12 +5,14 @@
<% for my $thread (@$threads) { =%>
<article class="thread">
<span class="id">
<%= link_to '#' . %$thread{'id'}, '/thread/' . %$thread{'id'} %>
<%= link_to "#$thread->{'id'}",
thread_idremark_page => {thread_id => $thread->{'id'}} %>
</span>
<h3 class="title"><%= %$thread{'title'} %></h3>
<h4 class="date"><%= %$thread{'date'} %></h4>
<h5 class="author"><%= %$thread{'author'} %></h5>
<p class="body"><%= %$thread{'body'} %></p>
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
</article>
<% } =%>
</div>