Sha256: 323a4ddd3b751a47d291f1143a3cebac293c3e435e79a7bd86f5bf4f45e332ef
Contents?: true
Size: 482 Bytes
Versions: 30
Compression:
Stored size: 482 Bytes
Contents
module AllowedActions extend ActiveSupport::Concern def bootdisk_type_allowed?(action = params[:action]) return true if Setting::Bootdisk.allowed_types&.include?(action) message = _('This type of bootdisk is not allowed. Please contact administrator.') if api_request? render_error :custom_error, status: :unprocessable_entity, locals: { message: message} else error(message) redirect_back(fallback_location: '/') end false end end
Version data entries
30 entries across 30 versions & 1 rubygems