Files
grecia/config/routes/proposal.rb
Javi Martín 4b42a68b6a Use the vote action to vote featured proposals
The action and the views were almost identical, with the supports
progress and the HTML classes of the success message element being the
only exceptions; we can use CSS for the styles instead.
2022-02-21 18:47:13 +01:00

53 lines
1.4 KiB
Ruby

resources :proposals do
resource :dashboard, only: [:show], controller: "dashboard" do
collection do
patch :publish
get :progress
get :community
get :recommended_actions
get :messages
get :related_content
end
resources :resources, only: [:index], controller: "dashboard/resources"
resources :achievements, only: [:index], controller: "dashboard/achievements"
resources :successful_supports, only: [:index], controller: "dashboard/successful_supports"
resources :supports, only: [:index], controller: "dashboard/supports"
resources :polls, except: [:show], controller: "dashboard/polls"
resources :mailing, only: [:index, :new, :create], controller: "dashboard/mailing"
resources :poster, only: [:index, :new], controller: "dashboard/poster"
resources :actions, only: [], controller: "dashboard/actions" do
member do
post :execute
post :unexecute
get :new_request
post :create_request
end
end
end
resources :polls, only: [:show, :results], controller: "polls" do
member do
get :results
end
end
member do
post :vote
put :flag
put :unflag
get :retire_form
get :share
get :created
patch :retire
patch :publish
end
collection do
get :map
get :suggest
get :summary
put "recommendations/disable", only: :index, controller: "proposals", action: :disable_recommendations
end
end