mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +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
|
|
@ -94,7 +94,9 @@ module Admin
|
|||
end
|
||||
|
||||
def comment
|
||||
comment = Comment.build_from(@event, current_user.id, comment_params)
|
||||
comment = Comment.new(comment_params)
|
||||
comment.commentable = @event
|
||||
comment.user_id = current_user.id
|
||||
comment.save!
|
||||
if !params[:parent].nil?
|
||||
comment.move_to_child_of(params[:parent])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue