match '/browse' => 'changeset#list', :via => :get
# web site
- root :to => 'site#index', :via => :get
+ root :to => 'site#index', :via => [:get, :post]
match '/edit' => 'site#edit', :via => :get
match '/copyright/:copyright_locale' => 'site#copyright', :via => :get
match '/copyright' => 'site#copyright', :via => :get
# permalink
match '/go/:code' => 'site#permalink', :via => :get, :code => /[a-zA-Z0-9_@~]+[=-]*/
+ # rich text preview
+ match '/preview/:format' => 'site#preview', :as => :preview
+
# traces
match '/user/:display_name/traces/tag/:tag/page/:page' => 'trace#list', :via => :get
match '/user/:display_name/traces/tag/:tag' => 'trace#list', :via => :get
match '/user/:display_name/diary/:id/hidecomment/:comment' => 'diary_entry#hidecomment', :via => :post, :id => /\d+/, :comment => /\d+/
# user pages
- match '/user/:display_name' => 'user#view', :via => :get
+ match '/user/:display_name' => 'user#view', :via => :get, :as => "user"
match '/user/:display_name/make_friend' => 'user#make_friend', :via => :get
match '/user/:display_name/remove_friend' => 'user#remove_friend', :via => :get
match '/user/:display_name/account' => 'user#account', :via => [:get, :post]
match '/oauth/test_request' => 'oauth#test_request', :as => :test_request
# roles and banning pages
- match '/user/:display_name/role/:role/grant' => 'user_roles#grant', :via => [:get, :post]
- match '/user/:display_name/role/:role/revoke' => 'user_roles#revoke', :via => [:get, :post]
+ match '/user/:display_name/role/:role/grant' => 'user_roles#grant', :via => :post, :as => "grant_role"
+ match '/user/:display_name/role/:role/revoke' => 'user_roles#revoke', :via => :post, :as => "revoke_role"
match '/user/:display_name/blocks' => 'user_blocks#blocks_on', :via => :get
match '/user/:display_name/blocks_by' => 'user_blocks#blocks_by', :via => :get
- match '/blocks/new/:display_name' => 'user_blocks#new', :via => :get
+ match '/blocks/new/:display_name' => 'user_blocks#new', :via => :get, :as => "new_user_block"
resources :user_blocks
- match '/blocks/:id/revoke' => 'user_blocks#revoke', :via => [:get, :post]
+ match '/blocks/:id/revoke' => 'user_blocks#revoke', :via => [:get, :post], :as => "revoke_user_block"
end