get "/user/:display_name/account", :to => redirect(:path => "/account/edit")
post "/user/:display_name/set_status" => "users#set_status", :as => :set_status_user
- resource :account, :only => [:edit, :update, :destroy]
-
- namespace :account do
- resource :deletion, :only => [:show]
+ resource :account, :only => [:edit, :update, :destroy] do
+ resource :deletion, :module => :accounts, :only => :show
end
+
resource :dashboard, :only => [:show]
resource :preferences, :only => [:show, :edit, :update]
resource :profile, :only => [:edit, :update]
get "/export/embed" => "export#embed"
# messages
- resources :messages, :id => /\d+/, :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]
+ resource :reply, :module => :messages, :path_names => { :new => "new" }, :only => :new
end
namespace :messages, :path => "/messages" do
resource :inbox, :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}")
+ get "/messages/:message_id/reply", :to => redirect(:path => "/messages/%{message_id}/reply/new")
# muting users
scope "/user/:display_name" do