post "/user/new" => "users#create"
get "/user/terms" => "users#terms"
post "/user/save" => "users#save"
- get "/user/:display_name/confirm/resend" => "confirmations#confirm_resend", :as => :user_confirm_resend
+ post "/user/:display_name/confirm/resend" => "confirmations#confirm_resend", :as => :user_confirm_resend
match "/user/:display_name/confirm" => "confirmations#confirm", :via => [:get, :post]
match "/user/confirm" => "confirmations#confirm", :via => [:get, :post]
match "/user/confirm-email" => "confirmations#confirm_email", :via => [:get, :post]
get "/export/embed" => "export#embed"
# messages
- resources :messages, :only => [:create, :show, :destroy] do
+ resources :messages, :path_names => { :new => "new/:display_name" }, :id => /\d+/, :only => [:new, :create, :show, :destroy] do
post :mark
patch :unmute
match :reply, :via => [:get, :post]
- collection do
- get :inbox
- get :muted
- get :outbox
- end
+ end
+ namespace :messages, :path => "/messages" do
+ resource :inbox, :only => :show
+ resource :muted_inbox, :path => "muted", :only => :show
+ resource :outbox, :only => :show
end
get "/user/:display_name/inbox", :to => redirect(:path => "/messages/inbox")
get "/user/:display_name/outbox", :to => redirect(:path => "/messages/outbox")
- get "/message/new/:display_name" => "messages#new", :as => "new_message"
+ get "/message/new/:display_name", :to => redirect(:path => "/messages/new/%{display_name}")
get "/message/read/:message_id", :to => redirect(:path => "/messages/%{message_id}")
# muting users