Sha256: efb53208940e148188fd573f28a4a80ffe406747916e877bb09ac5fca58fb926

Contents?: true

Size: 394 Bytes

Versions: 6

Compression:

Stored size: 394 Bytes

Contents

module Bootdisk::HostsControllerExt
  extend ActiveSupport::Concern

  included do
    alias_method :find_by_name_bootiso, :find_by_name
    before_filter :find_by_name_bootiso, :only => %w[bootdisk_iso]
  end

  def bootdisk_iso
    Bootdisk::ISOGenerator.new(@host.bootdisk_template_render).generate do |iso|
      send_data File.read(iso), :filename => "#{@host.name}.iso"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_bootdisk-1.2.3 app/controllers/concerns/bootdisk/hosts_controller_ext.rb
foreman_bootdisk-1.2.2 app/controllers/concerns/bootdisk/hosts_controller_ext.rb
foreman_bootdisk-1.2.1 app/controllers/concerns/bootdisk/hosts_controller_ext.rb
foreman_bootdisk-1.2.0 app/controllers/concerns/bootdisk/hosts_controller_ext.rb
foreman_bootdisk-1.1.0 app/controllers/concerns/bootdisk/hosts_controller_ext.rb
foreman_bootdisk-1.0.0 app/controllers/concerns/bootdisk/hosts_controller_ext.rb