You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
983 B
37 lines
983 B
<h1>Article#index</h1>
|
|
<p>Find me in app/views/articles/index.html.erb</p>
|
|
|
|
|
|
<button type="button"
|
|
class="btn btn-lg btn-danger"
|
|
data-bs-toggle="popover"
|
|
title="Popover title"
|
|
data-bs-content="Amazing content, right ?">
|
|
Click to toggle popover
|
|
</button>
|
|
|
|
<h1>Articles</h1>
|
|
<%= link_to "New Article", new_article_path %>
|
|
|
|
<ul>
|
|
<% @articles.each do |article| %>
|
|
<li>
|
|
<a href="/articles/<%= article.id %>">
|
|
<%= article.title %>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="<%= article_path(article) %>">
|
|
<%= article.title %>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<%= link_to article.title, article %> | <%= link_to "Edit", edit_article_path(article) %> | <%= link_to 'Delete', article, method: :delete, data: { confirm: 'Are you sure?' } %>
|
|
</li>
|
|
<li>
|
|
<%= pluralize(article.votes.count, "vote") %>|<%= button_to '+1', upvote_article_path(article), method: :post %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
|
|
|
|
|