mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-26 10:17:52 -05:00
- Move "show previous comments" into a partial - invoke said partial from the new comment form - add tests.
18 lines
665 B
Plaintext
18 lines
665 B
Plaintext
= content_for :title, @post.subject
|
|
|
|
= render :partial => "single", :locals => { :post => @post, :subject => false, :hide_comments => true }
|
|
|
|
- if can? :edit, @post or can? :destroy, @post
|
|
.post-actions
|
|
- if can? :edit, @post
|
|
= link_to 'Edit Post', edit_post_path(@post), :class => 'btn btn-mini'
|
|
- if can? :destroy, @post
|
|
= link_to 'Delete Post', @post, method: :delete, |
|
|
data: { confirm: 'Are you sure?' }, :class => 'btn btn-mini'
|
|
|
|
= render :partial => "comments", :locals => { :post => @post }
|
|
|
|
- if can? :create, Comment
|
|
.post-actions
|
|
=link_to 'Comment', new_comment_path(:post_id => @post.id), :class => 'btn btn-primary'
|