about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-04-19 07:52:37 -0400
committerEugen <eugen@zeonfederated.com>2017-04-19 13:52:37 +0200
commit8bac0350d16cb8e2770c089c91d71f8038404de5 (patch)
treef5b381319fde16fbe393dbae2cba1691f17aea9a /config
parentc0b30c56db36d0064ee7618976ab4e25f7a675fd (diff)
Restful refactor of accounts/ routes (#2133)
* Add routing specs for accounts followers and following actions

* Use more restful route naming for public account follow pages

Moves two actions:
- accounts#followers to accounts/follower_accounts#index
- accounts#following to accounts/following_accounts#index

Adds routing spec to ensure prior URLs are preserved.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/config/routes.rb b/config/routes.rb
index fef5bf916..bc67016a4 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -37,13 +37,10 @@ Rails.application.routes.draw do
     get :remote_follow,  to: 'remote_follow#new'
     post :remote_follow, to: 'remote_follow#create'
 
-    member do
-      get :followers
-      get :following
-
-      post :follow
-      post :unfollow
-    end
+    resources :followers, only: [:index], controller: :follower_accounts
+    resources :following, only: [:index], controller: :following_accounts
+    resource :follow, only: [:create], controller: :account_follow
+    resource :unfollow, only: [:create], controller: :account_unfollow
   end
 
   get '/@:username', to: 'accounts#show', as: :short_account