Name changes: remove delete request button.
This commit is contained in:
@@ -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])
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user