aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-03-22 17:20:55 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-03-22 17:20:55 +1100
commitb730b71fe936de277b2285333ab84cf82deb681a (patch)
treeb121d4bbef5628dcf857ede110a0322ee120f5a4
parent2973621ba353cb48e251fda31631f7bfa4f57621 (diff)
Simplify a couple of routes using resources
-rw-r--r--config/routes.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb
index a8a43cd82..809188654 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -60,8 +60,9 @@ Alaveteli::Application.routes.draw do
match '/request/:url_title/download' => 'request#download_entire_request', :as => :download_entire_request
####
- match '/request/:request_id/report' => 'reports#create', :as => :request_report, :via => :post
- match '/request/:request_id/report/new' => 'reports#new', :as => :new_request_report
+ resources :request, :only => [] do
+ resource :report, :only => [:new, :create]
+ end
#### User controller
# Use /profile for things to do with the currently signed in user.