app/views/mini_blog/articles/index.html.slim in mini_blog-0.1.0 vs app/views/mini_blog/articles/index.html.slim in mini_blog-0.1.1
- old
+ new
@@ -6,9 +6,15 @@
= "#{l(article.created_at)} #{article.title}"
ul
- article.tags.each do |tag|
li.badge.badge-dark.tag
= tag.name
+ - if user_signed_in?
+ ul.btn-group style="list-style-type: none"
+ li
+ = link_to 'Edit', [:edit, article], class: 'btn btn-info'
+ li
+ = link_to 'Destroy', article, method: :delete, data: {confirm: 'detele this?'}, class: 'btn btn-danger'
article.article.card-body.collapse*{id: "article-#{article.id}", 'data-id': article.id}
button.btn.btn-link.btn-sm.text-left data-toggle="collapse" href="#article-#{article.id}" role="button" aria-expanded="false" aria-controls="article-#{article.id}"
| open...
= paginate @articles, theme: :bootstrap4