Files
growstuff/app/views/comments/_form.html.haml
Skud e17dcf8671 Reordered comments: they are now DESC by default
Added scope "post_order" to order them ASC for display on post page.
Also tweaked post/comment views a bit.
2013-05-24 14:36:58 +10:00

18 lines
561 B
Plaintext

= form_for @comment do |f|
- if @comment.errors.any?
#error_explanation
%h2= "#{pluralize(@comment.errors.count, "error")} prohibited this comment from being saved:"
%ul
- @comment.errors.full_messages.each do |msg|
%li= msg
.field
= f.text_area :body, :rows => 6, :class => 'input-block-level'
%span.help-block
= render :partial => "shared/markdown_help"
.actions
= f.submit 'Post comment', :class => 'btn btn-primary'
- if defined?(@post)
.field
= f.hidden_field :post_id, :value => @post.id