diff options
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/config/routes.rb b/config/routes.rb index 10f6a3284..5af94768c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,4 @@ +# encoding: UTF-8 # config/routes.rb: # Mapping URLs to controllers for FOIFA. # @@ -13,7 +14,6 @@ Alaveteli::Application.routes.draw do #### General contoller match '/' => 'general#frontpage', :as => :frontpage match '/blog' => 'general#blog', :as => :blog - match '/stylesheets/custom.css' => 'general#custom_css', :as => :custom_css match '/search' => 'general#search_redirect', :as => :search_redirect match '/search/all' => 'general#search_redirect', :as => :search_redirect # XXX combined is the search query, and then if sorted a "/newest" at the end. @@ -23,8 +23,7 @@ Alaveteli::Application.routes.draw do match '/search/*combined/all' => 'general#search', :as => :search_general, :view => 'all' match '/search(/*combined)' => 'general#search', :as => :search_general match '/advancedsearch' => 'general#search_redirect', :as => :advanced_search, :advanced => true - - match '/random' => 'general#random_request', :as => :random_request + match '/version.:format' => 'general#version', :as => :version ##### ##### Request controller @@ -51,22 +50,19 @@ Alaveteli::Application.routes.draw do match '/request/:url_title/describe/:described_state' => 'request#describe_state_message', :as => :describe_state_message match '/request/:id/response' => 'request#show_response', :as => :show_response_no_followup match '/request/:id/response/:incoming_message_id' => 'request#show_response', :as => :show_response - match '/request/:id/response/:incoming_message_id/attach/html/:part/*file_name' => 'request#get_attachment_as_html', :as => :get_attachment_as_html - match '/request/:id/response/:incoming_message_id/attach/:part(/*file_name)' => 'request#get_attachment', :as => :get_attachment + match '/request/:id/response/:incoming_message_id/attach/html/:part/*file_name' => 'request#get_attachment_as_html', :format => false, :as => :get_attachment_as_html + match '/request/:id/response/:incoming_message_id/attach/:part(/*file_name)' => 'request#get_attachment', :format => false, :as => :get_attachment match '/request_event/:info_request_event_id' => 'request#show_request_event', :as => :info_request_event match '/upload/request/:url_title' => 'request#upload_response', :as => :upload_response match '/request/:url_title/download' => 'request#download_entire_request', :as => :download_entire_request - - # It would be nice to add :conditions => { :method => :post } to this next one, - # because it ought not really to be available as a GET request since it changes - # the server state. Unfortunately this doesn’t play well with the PostRedirect - # mechanism, which assumes all post-login actions are available via GET, so we - # refrain. - match '/request/:url_title/report' => 'request#report_request', :as => :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. # Use /user/XXXX for things that anyone can see about that user. |