about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorMatt Jankowski <mjankowski@thoughtbot.com>2017-05-23 12:11:39 -0400
committerEugen Rochko <eugen@zeonfederated.com>2017-05-23 18:11:39 +0200
commit4289ed1d13b9c3b91663581c44635105c4bc0412 (patch)
tree5f8f006a47676ac15bb0374c21a2dea4a6a40910 /config
parent256e3adc1d9508423aab8fcfb13745c9f85ff948 (diff)
Refactor of API timeline actions (#3263)
- Increase coverage to exercise all parts of each action
- Move into namespace to share common code
- Misc refactor of each action for smaller methods, simpler code
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb
index e3c6ce156..81c205daa 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -136,9 +136,11 @@ Rails.application.routes.draw do
         end
       end
 
-      get '/timelines/home',     to: 'timelines#home', as: :home_timeline
-      get '/timelines/public',   to: 'timelines#public', as: :public_timeline
-      get '/timelines/tag/:id',  to: 'timelines#tag', as: :hashtag_timeline
+      namespace :timelines do
+        resource :home, only: :show, controller: :home
+        resource :public, only: :show, controller: :public
+        resources :tag, only: :show
+      end
 
       get '/search', to: 'search#index', as: :search