Sha256: 838182e99b9359e6bd4501f82cc6a1582b7270f4af32ece840be3b66e4e3551d

Contents?: true

Size: 496 Bytes

Versions: 1

Compression:

Stored size: 496 Bytes

Contents

require 'uri'

module Bootdisk
  class DisksController < ::ApplicationController
    def generic_iso
      begin
        tmpl = Bootdisk::Renderer.new.generic_template_render
      rescue => e
        error _('Failed to render boot disk template: %s') % e
        redirect_to :back
        return
      end

      Bootdisk::ISOGenerator.new(tmpl).generate do |iso|
        send_data File.read(iso), :filename => "bootdisk_#{URI.parse(Setting[:foreman_url]).host}.iso"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foreman_bootdisk-2.0.2 app/controllers/bootdisk/disks_controller.rb