Use double quotes in config/routes

This commit is contained in:
Julian Herrero
2019-03-15 09:27:59 +01:00
parent a8d8d2cdf9
commit 8510624692
10 changed files with 47 additions and 47 deletions

View File

@@ -1,10 +1,10 @@
Rails.application.routes.draw do Rails.application.routes.draw do
mount Ckeditor::Engine => '/ckeditor' mount Ckeditor::Engine => "/ckeditor"
if Rails.env.development? || Rails.env.staging? if Rails.env.development? || Rails.env.staging?
get '/sandbox' => 'sandbox#index' get "/sandbox" => "sandbox#index"
get '/sandbox/*template' => 'sandbox#show' get "/sandbox/*template" => "sandbox#show"
end end
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development? mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
@@ -33,9 +33,9 @@ Rails.application.routes.draw do
draw :valuation draw :valuation
draw :verification draw :verification
root 'welcome#index' root "welcome#index"
get '/welcome', to: 'welcome#welcome' get "/welcome", to: "welcome#welcome"
get '/consul.json', to: "installation#details" get "/consul.json", to: "installation#details"
resources :stats, only: [:index] resources :stats, only: [:index]
resources :images, only: [:destroy] resources :images, only: [:destroy]
@@ -43,10 +43,10 @@ Rails.application.routes.draw do
resources :follows, only: [:create, :destroy] resources :follows, only: [:create, :destroy]
# More info pages # More info pages
get 'help', to: 'pages#show', id: 'help/index', as: 'help' 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/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" get "help/faq", to: "pages#show", id: "faq", as: "faq"
# Static pages # Static pages
resources :pages, path: '/', only: [:show] resources :pages, path: "/", only: [:show]
end end

View File

@@ -67,7 +67,7 @@ namespace :admin do
end end
resources :budget_investments, only: [:index, :show, :edit, :update] do 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" resources :progress_bars, except: :show, controller: "budget_investment_progress_bars"
member { patch :toggle_selection } member { patch :toggle_selection }
end end
@@ -152,12 +152,12 @@ namespace :admin do
end end
resources :questions, shallow: true do resources :questions, shallow: true do
resources :answers, except: [:index, :destroy], controller: 'questions/answers' do resources :answers, except: [:index, :destroy], controller: "questions/answers" do
resources :images, controller: 'questions/answers/images' resources :images, controller: "questions/answers/images"
resources :videos, controller: 'questions/answers/videos' resources :videos, controller: "questions/answers/videos"
get :documents, to: 'questions/answers#documents' get :documents, to: "questions/answers#documents"
end end
post '/answers/order_answers', to: 'questions/answers#order_answers' post "/answers/order_answers", to: "questions/answers#order_answers"
end end
resource :active_polls, only: [:create, :edit, :update] resource :active_polls, only: [:create, :edit, :update]
@@ -224,9 +224,9 @@ namespace :admin do
end end
resources :images, only: [:index, :update, :destroy] resources :images, only: [:index, :update, :destroy]
resources :content_blocks, except: [:show] resources :content_blocks, except: [:show]
delete '/heading_content_blocks/:id', to: 'content_blocks#delete_heading_content_block', as: 'delete_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' 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' put "/update_heading_content_blocks/:id", to: "content_blocks#update_heading_content_block", as: "update_heading_content_block"
resources :information_texts, only: [:index] do resources :information_texts, only: [:index] do
post :update, on: :collection post :update, on: :collection
end end

View File

@@ -15,14 +15,14 @@ resources :budgets, only: [:show, :index] do
end end
resource :results, only: :show, controller: "budgets/results" resource :results, only: :show, controller: "budgets/results"
resource :executions, only: :show, controller: 'budgets/executions' resource :executions, only: :show, controller: "budgets/executions"
end end
scope '/participatory_budget' do scope "/participatory_budget" do
resources :spending_proposals, only: [:index, :new, :create, :show, :destroy], path: 'investment_projects' do resources :spending_proposals, only: [:index, :new, :create, :show, :destroy], path: "investment_projects" do
post :vote, on: :member post :vote, on: :member
end end
end end
get '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' get "/budgets/:budget_id/investments/:id/json_data", action: :json_data, controller: "budgets/investments"

View File

@@ -10,6 +10,6 @@ resources :debates do
collection do collection do
get :map get :map
get :suggest get :suggest
put 'recommendations/disable', only: :index, controller: 'debates', action: :disable_recommendations put "recommendations/disable", only: :index, controller: "debates", action: :disable_recommendations
end end
end end

View File

@@ -1,27 +1,27 @@
devise_for :users, controllers: { devise_for :users, controllers: {
registrations: 'users/registrations', registrations: "users/registrations",
sessions: 'users/sessions', sessions: "users/sessions",
confirmations: 'users/confirmations', confirmations: "users/confirmations",
omniauth_callbacks: 'users/omniauth_callbacks' omniauth_callbacks: "users/omniauth_callbacks"
} }
devise_scope :user do devise_scope :user do
patch '/user/confirmation', to: 'users/confirmations#update', as: :update_user_confirmation patch "/user/confirmation", to: "users/confirmations#update", as: :update_user_confirmation
get '/user/registrations/check_username', to: 'users/registrations#check_username' get "/user/registrations/check_username", to: "users/registrations#check_username"
get 'users/sign_up/success', to: 'users/registrations#success' get "users/sign_up/success", to: "users/registrations#success"
get 'users/registrations/delete_form', to: 'users/registrations#delete_form' get "users/registrations/delete_form", to: "users/registrations#delete_form"
delete 'users/registrations', to: 'users/registrations#delete' delete "users/registrations", to: "users/registrations#delete"
get :finish_signup, to: 'users/registrations#finish_signup' get :finish_signup, to: "users/registrations#finish_signup"
patch :do_finish_signup, to: 'users/registrations#do_finish_signup' patch :do_finish_signup, to: "users/registrations#do_finish_signup"
end end
devise_for :organizations, class_name: 'User', devise_for :organizations, class_name: "User",
controllers: { controllers: {
registrations: 'organizations/registrations', registrations: "organizations/registrations",
sessions: 'devise/sessions', sessions: "devise/sessions",
}, },
skip: [:omniauth_callbacks] skip: [:omniauth_callbacks]
devise_scope :organization do devise_scope :organization do
get 'organizations/sign_up/success', to: 'organizations/registrations#success' get "organizations/sign_up/success", to: "organizations/registrations#success"
end end

View File

@@ -1,3 +1,3 @@
get '/graphql', to: 'graphql#query' get "/graphql", to: "graphql#query"
post '/graphql', to: 'graphql#query' post "/graphql", to: "graphql#query"
mount GraphiQL::Rails::Engine, at: '/graphiql', graphql_path: '/graphql' mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql"

View File

@@ -24,7 +24,7 @@ namespace :management do
end end
resource :session, only: [:create, :destroy] 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 resources :proposals, only: [:index, :new, :create, :show] do
post :vote, on: :member post :vote, on: :member
@@ -43,7 +43,7 @@ namespace :management do
get :print_investments get :print_investments
end 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 post :vote, on: :member
get :print, on: :collection get :print, on: :collection
end end

View File

@@ -28,7 +28,7 @@ namespace :moderation do
put :moderate, on: :collection put :moderate, on: :collection
end end
resources :budget_investments, only: :index, controller: 'budgets/investments' do resources :budget_investments, only: :index, controller: "budgets/investments" do
put :hide, on: :member put :hide, on: :member
put :moderate, on: :collection put :moderate, on: :collection
end end

View File

@@ -4,7 +4,7 @@ resources :polls, only: [:show, :index] do
get :results get :results
end end
resources :questions, controller: 'polls/questions', shallow: true do resources :questions, controller: "polls/questions", shallow: true do
post :answer, on: :member post :answer, on: :member
end end
end end

View File

@@ -13,6 +13,6 @@ resources :proposals do
get :map get :map
get :suggest get :suggest
get :summary get :summary
put 'recommendations/disable', only: :index, controller: 'proposals', action: :disable_recommendations put "recommendations/disable", only: :index, controller: "proposals", action: :disable_recommendations
end end
end end