clarion/app/controllers/management/propositions_controller.rb

27 lines
544 B
Ruby
Raw Normal View History

module Management
class PropositionsController < ManagementController
def index
@conference = find_conference
2015-07-26 14:55:01 +03:00
@events_by_proposer = @conference.events.undecided.group_by(&:proposer)
end
2015-10-15 19:06:41 +03:00
def update
@proposition = Proposition.find(params[:id])
@proposition.update(proposition_params)
redirect_to :back
end
private
2015-10-15 19:06:41 +03:00
def proposition_params
params.require(:proposition).permit(:status)
end
def find_conference
Conference.find(params[:conference_id])
end
end
end