diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-04-11 16:00:43 -0400 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-11 22:00:43 +0200 |
commit | 3ddd936b039474259cff3793c767ecb7f74e89e0 (patch) | |
tree | def84f4d35f11defaeb779049fec3f45998d9135 /config | |
parent | 1921c5416b08d8374ee7aee6c072eed9b67c58c8 (diff) |
Refactor exports controller (#1567)
* Add basic coverage for settings/exports controller * Remove unused @account variable from settings/exports controller * Add coverage for download export actions * Remove deprecated `render :text` in favor of `send_data` for csv downloads * Add model to handle exports * Use Export class in settings/exports controller * Simplify settings/exports controller methods * Move settings/export to more restful routes
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/config/routes.rb b/config/routes.rb index 9adcdb862..69f8887b2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -53,11 +53,10 @@ Rails.application.routes.draw do resource :preferences, only: [:show, :update] resource :import, only: [:show, :create] - resource :export, only: [:show] do - collection do - get :follows, to: 'exports#download_following_list' - get :blocks, to: 'exports#download_blocking_list' - end + resource :export, only: [:show] + namespace :exports, constraints: { format: :csv } do + resources :follows, only: :index, controller: :following_accounts + resources :blocks, only: :index, controller: :blocked_accounts end resource :two_factor_auth, only: [:show, :new, :create] do |