Name changes: remove delete request button.

This commit is contained in:
evazion
2017-01-14 23:34:07 +00:00
parent f57f352838
commit 66e30b323c
3 changed files with 1 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
class UserNameChangeRequestsController < ApplicationController
before_filter :gold_only, :only => [:new, :create, :show]
before_filter :admin_only, :only => [:index, :approve, :reject, :destroy]
before_filter :admin_only, :only => [:index, :approve, :reject]
rescue_from User::PrivilegeError, :with => :access_denied
def new
@@ -38,12 +38,6 @@ class UserNameChangeRequestsController < ApplicationController
redirect_to user_name_change_request_path(@change_request), :notice => "Name change request approved"
end
def destroy
@change_request = UserNameChangeRequest.find(params[:id])
@change_request.destroy
redirect_to user_name_change_requests_path
end
def reject
@change_request = UserNameChangeRequest.find(params[:id])
@change_request.reject!(params[:reason])

View File

@@ -83,10 +83,4 @@
<% end %>
</section>
<% end %>
<section>
<%= form_tag(user_name_change_request_path(@change_request), :method => :delete) do %>
<%= submit_tag "Delete" %>
<% end %>
</section>
</div>

View File

@@ -61,13 +61,6 @@ class UserNameChangeRequestsControllerTest < ActionController::TestCase
assert_redirected_to(user_name_change_request_path(@change_request))
end
end
context "destroy action" do
should "destroy" do
post :destroy, {:id => @change_request.id}, {:user_id => @admin.id}
assert_redirected_to(user_name_change_requests_path)
end
end
end
end
end