Sha256: b18dfed959a00f1030c108d3391652029000f8aa834395085b2a75a76c042a1a
Contents?: true
Size: 722 Bytes
Versions: 21
Compression:
Stored size: 722 Bytes
Contents
module Shipit 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.active_task? @rollback = @deploy.trigger_rollback(current_user, env: rollback_params[:env]) 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, env: @stack.deploy_variables.map(&:name)) end end end
Version data entries
21 entries across 21 versions & 1 rubygems