Sha256: 351c8904851ca7a55e82acf600870d5db59a6a95f3a63e5fc756941dd6f212c9
Contents?: true
Size: 568 Bytes
Versions: 5
Compression:
Stored size: 568 Bytes
Contents
module Shipit class CommitsController < ShipitController def update if update_params[:locked].present? if Shipit::CastValue.to_boolean(update_params[:locked]) commit.lock(current_user) else commit.unlock end end head :ok end private def commit @commit ||= stack.commits.find(params[:id]) end def stack @stack ||= Stack.from_param!(params[:stack_id]) end def update_params @update_params ||= params.require(:commit).permit(:locked) end end end
Version data entries
5 entries across 5 versions & 1 rubygems