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
This commit is contained in:
parent
256e3adc1d
commit
4289ed1d13
11 changed files with 298 additions and 97 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue