diff options
-rw-r--r-- | app/views/admin_general/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/admin_public_body/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/contact_mailer/add_public_body.text.erb | 2 | ||||
-rw-r--r-- | config/routes.rb | 3 | ||||
-rw-r--r-- | spec/controllers/public_body_change_requests_controller_spec.rb | 2 |
5 files changed, 5 insertions, 6 deletions
diff --git a/app/views/admin_general/index.html.erb b/app/views/admin_general/index.html.erb index 0991ea2f5..f9b6f5d3d 100644 --- a/app/views/admin_general/index.html.erb +++ b/app/views/admin_general/index.html.erb @@ -186,7 +186,7 @@ <%= form_tag admin_change_request_update_path(@change_request), :class => "form form-horizontal" do %> <%= submit_tag 'Close', :class => "btn btn-danger" %> <%= link_to("Close and respond", admin_change_request_edit_path(@change_request), :class => 'btn') %> - <%= link_to("Add authority", admin_body_new_path(:change_request_id => @change_request.id), :class => 'btn btn-primary') %> + <%= link_to("Add authority", new_admin_body_path(:change_request_id => @change_request.id), :class => 'btn btn-primary') %> <% end %> <% end %> diff --git a/app/views/admin_public_body/index.html.erb b/app/views/admin_public_body/index.html.erb index 64d2deb42..8516de90c 100644 --- a/app/views/admin_public_body/index.html.erb +++ b/app/views/admin_public_body/index.html.erb @@ -8,7 +8,7 @@ <div class="btn-toolbar"> <div class="btn-group"> - <%= link_to 'New public authority', admin_body_new_path, :class => "btn btn-primary" %> + <%= link_to 'New public authority', new_admin_body_path, :class => "btn btn-primary" %> </div> <div class="btn-group"> <%= link_to 'Import from CSV file', admin_body_import_csv_path, :class => "btn btn-warning" %> diff --git a/app/views/contact_mailer/add_public_body.text.erb b/app/views/contact_mailer/add_public_body.text.erb index 5baa1fa1a..f3dc23aac 100644 --- a/app/views/contact_mailer/add_public_body.text.erb +++ b/app/views/contact_mailer/add_public_body.text.erb @@ -13,7 +13,7 @@ <%= @change_request.notes %> <%= _('Add the authority:') %> -<%= admin_body_new_url(:change_request_id => @change_request.id, :only_path => false ) %> +<%= new_admin_body_url(:change_request_id => @change_request.id, :only_path => false ) %> <%= _('Close the request and respond:') %> <%= admin_change_request_edit_url(:id => @change_request.id, :only_path => false ) %> diff --git a/config/routes.rb b/config/routes.rb index 50125359f..2ed20d4ad 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -171,12 +171,11 @@ Alaveteli::Application.routes.draw do #### AdminPublicBody controller scope '/admin', :as => 'admin' do resources :bodies, - :except => [:new, :create, :update, :edit, :destroy], + :except => [:create, :update, :edit, :destroy], :controller => 'admin_public_body' do end end match '/admin/missing_scheme' => 'admin_public_body#missing_scheme', :as => :admin_body_missing - match '/admin/body/new' => 'admin_public_body#new', :as => :admin_body_new match '/admin/body/edit/:id' => 'admin_public_body#edit', :as => :admin_body_edit match '/admin/body/update/:id' => 'admin_public_body#update', :as => :admin_body_update match '/admin/body/create' => 'admin_public_body#create', :as => :admin_body_create diff --git a/spec/controllers/public_body_change_requests_controller_spec.rb b/spec/controllers/public_body_change_requests_controller_spec.rb index 8fe7befeb..9d6cfb26e 100644 --- a/spec/controllers/public_body_change_requests_controller_spec.rb +++ b/spec/controllers/public_body_change_requests_controller_spec.rb @@ -37,7 +37,7 @@ describe PublicBodyChangeRequestsController, "creating a change request" do mail.body.should include('new_body@example.com') mail.body.should include('New Body') mail.body.should include("Please") - mail.body.should include('http://test.host/admin/body/new?change_request_id=') + mail.body.should include('http://test.host/admin/bodies/new?change_request_id=') mail.body.should include('http://test.host/admin/change_request/edit/') end |