mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 05:34:04 +00:00
rewrite comments form, use strong parameters with comments
This commit is contained in:
parent
3ad009658d
commit
3f882957cf
3 changed files with 10 additions and 7 deletions
|
|
@ -6,10 +6,10 @@
|
|||
%div
|
||||
%a.pull-right.comment-reply-link{href: "#"} Reply
|
||||
.comment-reply
|
||||
= form_tag "#{comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id)}", method: :post do
|
||||
= semantic_form_for :comment, url: "#{comment_admin_conference_program_event_path(@conference.short_title, comment.commentable_id)}", method: :post do |f|
|
||||
= f.input :body
|
||||
%input{name: "parent", type: "hidden", value: "#{comment.id}"}
|
||||
%input{name: "authenticity_token", type: "hidden", value: "#{form_authenticity_token}"}
|
||||
%textarea{name: "comment"}
|
||||
%button.btn.btn-primary.pull-right{name: "button", type: "submit"} Add Reply
|
||||
- comment.children.each do |child|
|
||||
= render "nested_comments", comment: child, padding: 50
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue