Use double quotes in config/routes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user