Skip to content

Commit

Permalink
used the new admin_pages_url
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityblast committed Dec 16, 2008
1 parent b7d93af commit 07015cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/controllers/copy_move_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ def copy_move
end
end
end
redirect_to(page_index_url)
redirect_to(admin_pages_url)
end

private

def find_page
@page = Page.find(params[:id])
rescue ActiveRecord::RecordNotFound
redirect_to(page_index_url)
redirect_to(admin_pages_url)
end

def find_new_parent
Expand Down
2 changes: 1 addition & 1 deletion app/views/copy_move/index.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
</div>
<p class="buttons">
<%= submit_tag "Ok", :class => 'button' %>
or <%= link_to 'Cancel', page_index_url %>
or <%= link_to 'Cancel', admin_pages_url %>
</p>
<% end -%>
4 changes: 2 additions & 2 deletions test/functional/copy_move_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setup

def test_index_should_redirect_if_page_does_not_exist
get :index, :id => 1111
assert_response :redirect, page_index_url
assert_response :redirect, admin_pages_url
end

def test_index_should_not_redirect_if_page_exists
Expand All @@ -27,7 +27,7 @@ def test_index_should_not_redirect_if_page_exists

def test_copy_move_should_redirect_if_page_does_not_exist
post :copy_move, :id => 9999
assert_response :redirect, page_index_url
assert_response :redirect, admin_pages_url
end

def test_copy_move_should_duplicate_page
Expand Down

0 comments on commit 07015cd

Please sign in to comment.