diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-11-04 14:53:27 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-12-12 16:47:14 +0000 |
commit | 081c419f665db454b98d8edb60eb67d9d8884c07 (patch) | |
tree | 40ec7787d131febcf9de91968af9cac7dba89c08 | |
parent | dcfa7fd733008cd4b0bf066729df4b232342c65b (diff) |
RESTful routing for editing and updating.
-rw-r--r-- | app/views/admin_request/_some_annotations.html.erb | 2 | ||||
-rw-r--r-- | app/views/admin_request/edit.html.erb | 2 | ||||
-rw-r--r-- | app/views/admin_request/show.html.erb | 4 | ||||
-rw-r--r-- | config/routes.rb | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/app/views/admin_request/_some_annotations.html.erb b/app/views/admin_request/_some_annotations.html.erb index 4fd313451..f4ec63e39 100644 --- a/app/views/admin_request/_some_annotations.html.erb +++ b/app/views/admin_request/_some_annotations.html.erb @@ -58,4 +58,4 @@ <% end %> <% else %> <p>None yet.</p> -<% end %> +<% end %> diff --git a/app/views/admin_request/edit.html.erb b/app/views/admin_request/edit.html.erb index 68aeb4961..db0b54655 100644 --- a/app/views/admin_request/edit.html.erb +++ b/app/views/admin_request/edit.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'info_request' %> -<%= form_tag admin_request_update_path(@info_request) do %> +<%= form_tag admin_request_path(@info_request), :method => :put do %> <p><label for="info_request_title"><strong>Title</strong></label> (warning: editing this will break URLs right now)<br/> <%= text_field 'info_request', 'title', :size => 50 %></p> diff --git a/app/views/admin_request/show.html.erb b/app/views/admin_request/show.html.erb index 38cd06b64..2ca4f5733 100644 --- a/app/views/admin_request/show.html.erb +++ b/app/views/admin_request/show.html.erb @@ -15,7 +15,7 @@ <thead> <tr> <td colspan="2"> - <%= link_to 'Edit metadata', admin_request_edit_path(@info_request), :class => "btn" %> + <%= link_to 'Edit metadata', edit_admin_request_path(@info_request), :class => "btn" %> </td> </tr> </thead> @@ -100,7 +100,7 @@ <tfoot> <tr> <td colspan="2"> - <%= link_to 'Edit metadata', admin_request_edit_path(@info_request), :class => "btn" %> + <%= link_to 'Edit metadata', edit_admin_request_path(@info_request), :class => "btn" %> </td> </tr> </tfoot> diff --git a/config/routes.rb b/config/routes.rb index 283861efa..61b4e83db 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -221,8 +221,6 @@ Alaveteli::Application.routes.draw do post 'generate_upload_url', :on => :member end end - match '/admin/request/edit/:id' => 'admin_request#edit', :as => :admin_request_edit - match '/admin/request/update/:id' => 'admin_request#update', :as => :admin_request_update match '/admin/request/show_raw_email/:id' => 'admin_request#show_raw_email', :as => :admin_request_show_raw_email match '/admin/request/download_raw_email/:id' => 'admin_request#download_raw_email', :as => :admin_request_download_raw_email match '/admin/request/mark_event_as_clarification' => 'admin_request#mark_event_as_clarification', :as => :admin_request_clarification |