Skip to content

Commit

Permalink
fix comment params in other controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Coffman authored and jmcmichael committed Feb 16, 2015
1 parent fe41e37 commit bf32426
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/evidence_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def evidence_item_params
end

def comment_params
JSON.parse(params.permit(:comment)[:comment])
params[:comment].permit(:text, :title)
end

def attach_comment(item)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/variants_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def variant_params
end

def comment_params
JSON.parse(params.permit(:comment)[:comment])
params[:comment].permit(:title, :text)
end

def attach_comment(variant)
Expand Down

0 comments on commit bf32426

Please sign in to comment.