Commit 6a0ea605 authored by Mehmet Emin İNAÇ's avatar Mehmet Emin İNAÇ

Change deprecated usage of rendering without response body

`render nothing: true` has been deprecated.
For more information see [pr](https://github.com/rails/rails/pull/20336)
parent 64d0dd18
......@@ -9,6 +9,6 @@ def destroy
abuse_report.remove_user if params[:remove_user]
abuse_report.destroy
render nothing: true
head :ok
end
end
......@@ -32,7 +32,7 @@ def destroy
respond_to do |format|
format.html { redirect_back_or_default(default: { action: 'index' }) }
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -6,7 +6,7 @@ def show
respond_to do |format|
format.html
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -11,7 +11,7 @@ def destroy
redirect_to admin_spam_logs_path, notice: "User #{spam_log.user.username} was successfully removed."
else
spam_log.destroy
render nothing: true
head :ok
end
end
end
......@@ -135,7 +135,7 @@ def remove_email
respond_to do |format|
format.html { redirect_back_or_admin_user(notice: "Successfully removed email.") }
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -6,7 +6,7 @@ def toggle_subscription
subscribable_resource.toggle_subscription(current_user)
render nothing: true
head :ok
end
private
......
......@@ -10,7 +10,7 @@ def destroy
respond_to do |format|
format.html { redirect_to dashboard_todos_path, notice: 'Todo was successfully marked as done.' }
format.js { render nothing: true }
format.js { head :ok }
end
end
......@@ -19,7 +19,7 @@ def destroy_all
respond_to do |format|
format.html { redirect_to dashboard_todos_path, notice: 'All todos were marked as done.' }
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -43,7 +43,7 @@ def destroy
respond_to do |format|
format.html { redirect_to group_group_members_path(@group), notice: 'User was successfully removed from group.' }
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -24,7 +24,7 @@ def destroy
respond_to do |format|
format.html { redirect_to profile_emails_url }
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -27,7 +27,7 @@ def destroy
respond_to do |format|
format.html { redirect_to profile_keys_url }
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -68,7 +68,7 @@ def destroy
respond_to do |format|
format.html { redirect_to namespace_project_milestones_path }
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -44,7 +44,7 @@ def destroy
end
respond_to do |format|
format.js { render nothing: true }
format.js { head :ok }
end
end
......@@ -53,7 +53,7 @@ def delete_attachment
note.update_attribute(:attachment, nil)
respond_to do |format|
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -55,7 +55,7 @@ def destroy
format.html do
redirect_to namespace_project_project_members_path(@project.namespace, @project)
end
format.js { render nothing: true }
format.js { head :ok }
end
end
......@@ -81,7 +81,7 @@ def leave
respond_to do |format|
format.html { redirect_to dashboard_projects_path, notice: "You left the project." }
format.js { render nothing: true }
format.js { head :ok }
end
else
if current_user == @project.owner
......
......@@ -39,7 +39,7 @@ def destroy
respond_to do |format|
format.html { redirect_to namespace_project_protected_branches_path }
format.js { render nothing: true }
format.js { head :ok }
end
end
......
......@@ -42,7 +42,7 @@
before do
public_project.lfs_objects << lfs_object
allow_any_instance_of(LfsObjectUploader).to receive(:exists?).and_return(true)
allow(controller).to receive(:send_file) { controller.render nothing: true }
allow(controller).to receive(:send_file) { controller.head :ok }
end
it 'serves the file' do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment