Sha256: 0419c20695e88c1593cf20a64d397a055da09e021ec59db9fd7ddf5840ea8144

Contents?: true

Size: 737 Bytes

Versions: 42

Compression:

Stored size: 737 Bytes

Contents

class ::IshManager::ApplianceTmplsController < IshManager::ApplicationController

  before_action :set_lists

  def create
    @appliance_tmpl = Wco::ApplianceTmpl.new params[:appliance].permit!
    authorize! :create, @appliance_tmpl

    flag = @appliance_tmpl.save
    if flag
      flash[:notice] = 'Success.'
      redirect_to action: :index
    else
      flash[:alert] = "Cannot create appliance tmplate: #{@appliance_tmpl.errors.full_messages.join(', ')}."
      render action: :index
    end
  end

  def index
    authorize! :index, Wco::ApplianceTmpl
    @appliance_tmpls = Wco::ApplianceTmpl.all
  end

  ##
  ## private
  ##
  private

  def set_lists
    super
    @new_appliance_tmpl = Wco::ApplianceTmpl.new
  end

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
ish_manager-0.1.8.500 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.499 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.498 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.497 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.496 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.495 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.494 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.493 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.492 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.491 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.490 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.489 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.488 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.487 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.486 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.485 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.484 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.483 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.482 app/controllers/ish_manager/appliance_tmpls_controller.rb
ish_manager-0.1.8.481 app/controllers/ish_manager/appliance_tmpls_controller.rb