Replace render :nothing with head :ok
Using `render :nothing` was deprecated, but we never noticed it because we didn't have a test for the action using it. In Rails 5.1, it raises an exception. Using `head :ok` and adding a test for this scenario solves the issue.
This commit is contained in:
@@ -44,7 +44,7 @@ class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController
|
||||
|
||||
def order_answers
|
||||
::Poll::Question::Answer.order_answers(params[:ordered_list])
|
||||
render nothing: true
|
||||
head :ok
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user