Sha256: d79e44f096490608b9a9deb315276fa473fa15b5d452f79af493e5f61f8912a8
Contents?: true
Size: 594 Bytes
Versions: 6
Compression:
Stored size: 594 Bytes
Contents
class RollbacksController < ShipitController before_action :load_stack before_action :load_deploy def create return redirect_to rollback_stack_deploy_path(@stack, @deploy) if !params[:force] && @stack.deploying? @rollback = @deploy.trigger_rollback(current_user) redirect_to stack_deploy_path(@stack, @rollback) end private def load_stack @stack ||= Stack.from_param!(params[:stack_id]) end def load_deploy @deploy = @stack.deploys.find(rollback_params[:parent_id]) end def rollback_params params.require(:rollback).permit(:parent_id) end end
Version data entries
6 entries across 6 versions & 1 rubygems