diff --git a/config/routes.rb b/config/routes.rb index 386f6044e..b2155a02b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,10 @@ Rails.application.routes.draw do - mount Ckeditor::Engine => '/ckeditor' + mount Ckeditor::Engine => "/ckeditor" if Rails.env.development? || Rails.env.staging? - get '/sandbox' => 'sandbox#index' - get '/sandbox/*template' => 'sandbox#show' + get "/sandbox" => "sandbox#index" + get "/sandbox/*template" => "sandbox#show" end mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development? @@ -33,9 +33,9 @@ Rails.application.routes.draw do draw :valuation draw :verification - root 'welcome#index' - get '/welcome', to: 'welcome#welcome' - get '/consul.json', to: "installation#details" + root "welcome#index" + get "/welcome", to: "welcome#welcome" + get "/consul.json", to: "installation#details" resources :stats, only: [:index] resources :images, only: [:destroy] @@ -43,10 +43,10 @@ Rails.application.routes.draw do resources :follows, only: [:create, :destroy] # More info pages - get 'help', to: 'pages#show', id: 'help/index', as: 'help' - get 'help/how-to-use', to: 'pages#show', id: 'help/how_to_use/index', as: 'how_to_use' + get "help", to: "pages#show", id: "help/index", as: "help" + get "help/how-to-use", to: "pages#show", id: "help/how_to_use/index", as: "how_to_use" get "help/faq", to: "pages#show", id: "faq", as: "faq" # Static pages - resources :pages, path: '/', only: [:show] + resources :pages, path: "/", only: [:show] end diff --git a/config/routes/admin.rb b/config/routes/admin.rb index e12975663..fb3564bc2 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -67,7 +67,7 @@ namespace :admin do end resources :budget_investments, only: [:index, :show, :edit, :update] do - resources :milestones, controller: 'budget_investment_milestones' + resources :milestones, controller: "budget_investment_milestones" resources :progress_bars, except: :show, controller: "budget_investment_progress_bars" member { patch :toggle_selection } end @@ -152,12 +152,12 @@ namespace :admin do end resources :questions, shallow: true do - resources :answers, except: [:index, :destroy], controller: 'questions/answers' do - resources :images, controller: 'questions/answers/images' - resources :videos, controller: 'questions/answers/videos' - get :documents, to: 'questions/answers#documents' + resources :answers, except: [:index, :destroy], controller: "questions/answers" do + resources :images, controller: "questions/answers/images" + resources :videos, controller: "questions/answers/videos" + get :documents, to: "questions/answers#documents" end - post '/answers/order_answers', to: 'questions/answers#order_answers' + post "/answers/order_answers", to: "questions/answers#order_answers" end resource :active_polls, only: [:create, :edit, :update] @@ -224,9 +224,9 @@ namespace :admin do end resources :images, only: [:index, :update, :destroy] resources :content_blocks, except: [:show] - delete '/heading_content_blocks/:id', to: 'content_blocks#delete_heading_content_block', as: 'delete_heading_content_block' - get '/edit_heading_content_blocks/:id', to: 'content_blocks#edit_heading_content_block', as: 'edit_heading_content_block' - put '/update_heading_content_blocks/:id', to: 'content_blocks#update_heading_content_block', as: 'update_heading_content_block' + delete "/heading_content_blocks/:id", to: "content_blocks#delete_heading_content_block", as: "delete_heading_content_block" + get "/edit_heading_content_blocks/:id", to: "content_blocks#edit_heading_content_block", as: "edit_heading_content_block" + put "/update_heading_content_blocks/:id", to: "content_blocks#update_heading_content_block", as: "update_heading_content_block" resources :information_texts, only: [:index] do post :update, on: :collection end diff --git a/config/routes/budget.rb b/config/routes/budget.rb index 0159b946a..215b0bc75 100644 --- a/config/routes/budget.rb +++ b/config/routes/budget.rb @@ -15,14 +15,14 @@ resources :budgets, only: [:show, :index] do end resource :results, only: :show, controller: "budgets/results" - resource :executions, only: :show, controller: 'budgets/executions' + resource :executions, only: :show, controller: "budgets/executions" end -scope '/participatory_budget' do - resources :spending_proposals, only: [:index, :new, :create, :show, :destroy], path: 'investment_projects' do +scope "/participatory_budget" do + resources :spending_proposals, only: [:index, :new, :create, :show, :destroy], path: "investment_projects" do post :vote, on: :member end end -get 'investments/:id/json_data', action: :json_data, controller: 'budgets/investments' -get '/budgets/:budget_id/investments/:id/json_data', action: :json_data, controller: 'budgets/investments' +get "investments/:id/json_data", action: :json_data, controller: "budgets/investments" +get "/budgets/:budget_id/investments/:id/json_data", action: :json_data, controller: "budgets/investments" diff --git a/config/routes/debate.rb b/config/routes/debate.rb index 4167ed68c..eeb3b6afe 100644 --- a/config/routes/debate.rb +++ b/config/routes/debate.rb @@ -10,6 +10,6 @@ resources :debates do collection do get :map get :suggest - put 'recommendations/disable', only: :index, controller: 'debates', action: :disable_recommendations + put "recommendations/disable", only: :index, controller: "debates", action: :disable_recommendations end end diff --git a/config/routes/devise.rb b/config/routes/devise.rb index e789aec52..cb60483e4 100644 --- a/config/routes/devise.rb +++ b/config/routes/devise.rb @@ -1,27 +1,27 @@ devise_for :users, controllers: { - registrations: 'users/registrations', - sessions: 'users/sessions', - confirmations: 'users/confirmations', - omniauth_callbacks: 'users/omniauth_callbacks' + registrations: "users/registrations", + sessions: "users/sessions", + confirmations: "users/confirmations", + omniauth_callbacks: "users/omniauth_callbacks" } devise_scope :user do - patch '/user/confirmation', to: 'users/confirmations#update', as: :update_user_confirmation - get '/user/registrations/check_username', to: 'users/registrations#check_username' - get 'users/sign_up/success', to: 'users/registrations#success' - get 'users/registrations/delete_form', to: 'users/registrations#delete_form' - delete 'users/registrations', to: 'users/registrations#delete' - get :finish_signup, to: 'users/registrations#finish_signup' - patch :do_finish_signup, to: 'users/registrations#do_finish_signup' + patch "/user/confirmation", to: "users/confirmations#update", as: :update_user_confirmation + get "/user/registrations/check_username", to: "users/registrations#check_username" + get "users/sign_up/success", to: "users/registrations#success" + get "users/registrations/delete_form", to: "users/registrations#delete_form" + delete "users/registrations", to: "users/registrations#delete" + get :finish_signup, to: "users/registrations#finish_signup" + patch :do_finish_signup, to: "users/registrations#do_finish_signup" end -devise_for :organizations, class_name: 'User', +devise_for :organizations, class_name: "User", controllers: { - registrations: 'organizations/registrations', - sessions: 'devise/sessions', + registrations: "organizations/registrations", + sessions: "devise/sessions", }, skip: [:omniauth_callbacks] devise_scope :organization do - get 'organizations/sign_up/success', to: 'organizations/registrations#success' + get "organizations/sign_up/success", to: "organizations/registrations#success" end diff --git a/config/routes/graphql.rb b/config/routes/graphql.rb index d41efc54a..83e4594fc 100644 --- a/config/routes/graphql.rb +++ b/config/routes/graphql.rb @@ -1,3 +1,3 @@ -get '/graphql', to: 'graphql#query' -post '/graphql', to: 'graphql#query' -mount GraphiQL::Rails::Engine, at: '/graphiql', graphql_path: '/graphql' +get "/graphql", to: "graphql#query" +post "/graphql", to: "graphql#query" +mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql" diff --git a/config/routes/management.rb b/config/routes/management.rb index 167fbfbe4..ff6cc9621 100644 --- a/config/routes/management.rb +++ b/config/routes/management.rb @@ -24,7 +24,7 @@ namespace :management do end resource :session, only: [:create, :destroy] - get 'sign_in', to: 'sessions#create', as: :sign_in + get "sign_in", to: "sessions#create", as: :sign_in resources :proposals, only: [:index, :new, :create, :show] do post :vote, on: :member @@ -43,7 +43,7 @@ namespace :management do get :print_investments end - resources :investments, only: [:index, :new, :create, :show, :destroy], controller: 'budgets/investments' do + resources :investments, only: [:index, :new, :create, :show, :destroy], controller: "budgets/investments" do post :vote, on: :member get :print, on: :collection end diff --git a/config/routes/moderation.rb b/config/routes/moderation.rb index e6b0020cd..1b0eadc09 100644 --- a/config/routes/moderation.rb +++ b/config/routes/moderation.rb @@ -28,7 +28,7 @@ namespace :moderation do put :moderate, on: :collection end - resources :budget_investments, only: :index, controller: 'budgets/investments' do + resources :budget_investments, only: :index, controller: "budgets/investments" do put :hide, on: :member put :moderate, on: :collection end diff --git a/config/routes/poll.rb b/config/routes/poll.rb index 2e9502745..96c43f856 100644 --- a/config/routes/poll.rb +++ b/config/routes/poll.rb @@ -4,7 +4,7 @@ resources :polls, only: [:show, :index] do get :results end - resources :questions, controller: 'polls/questions', shallow: true do + resources :questions, controller: "polls/questions", shallow: true do post :answer, on: :member end end diff --git a/config/routes/proposal.rb b/config/routes/proposal.rb index b0736ec0e..b44d30487 100644 --- a/config/routes/proposal.rb +++ b/config/routes/proposal.rb @@ -13,6 +13,6 @@ resources :proposals do get :map get :suggest get :summary - put 'recommendations/disable', only: :index, controller: 'proposals', action: :disable_recommendations + put "recommendations/disable", only: :index, controller: "proposals", action: :disable_recommendations end end