Add new Proposal share endpoint, plus ability for ereryone to use it
This commit is contained in:
@@ -45,6 +45,9 @@ class ProposalsController < ApplicationController
|
||||
def retire_form
|
||||
end
|
||||
|
||||
def share
|
||||
end
|
||||
|
||||
def vote_featured
|
||||
@proposal.register_vote(current_user, 'yes')
|
||||
set_featured_proposal_votes(@proposal)
|
||||
|
||||
@@ -4,7 +4,7 @@ module Abilities
|
||||
|
||||
def initialize(user)
|
||||
can [:read, :map], Debate
|
||||
can [:read, :map, :summary], Proposal
|
||||
can [:read, :map, :summary, :share], Proposal
|
||||
can :read, Comment
|
||||
can :read, Poll
|
||||
can :read, Poll::Question
|
||||
|
||||
@@ -52,6 +52,7 @@ Rails.application.routes.draw do
|
||||
put :flag
|
||||
put :unflag
|
||||
get :retire_form
|
||||
get :share
|
||||
patch :retire
|
||||
end
|
||||
collection do
|
||||
|
||||
Reference in New Issue
Block a user