Sha256: c7b4f7b327281fa434c2e08b392e9c9ce58db1095f3b7ff2756ba1a68ecc7b98

Contents?: true

Size: 545 Bytes

Versions: 13

Compression:

Stored size: 545 Bytes

Contents

class Cbac::UpgradeController < ApplicationController

  layout 'cbac'

  def index
    @permissions =  Cbac::CbacPristine::PristinePermission.all    
  end

  def update

    params[:permissions].each do |perm_array|
      next if perm_array[1][:action] == 'leave'
      permission = Cbac::CbacPristine::PristinePermission.find(perm_array[1][:id])
      case perm_array[1][:action]
        when 'accept'
          permission.accept
        when 'reject'
          permission.reject
      end
    end
    redirect_to :action => :index

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
cbac-0.8.0 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.7.0 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.6.10 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.6.9 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.6.8 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.6.7 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.6.5 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.6.4 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.6.2 lib/generators/cbac/copy_files/controllers/upgrade_controller.rb
cbac-0.5.4 generators/cbac/templates/controllers/upgrade_controller.rb
cbac-0.5.3 generators/cbac/templates/controllers/upgrade_controller.rb
cbac-0.5.2 generators/cbac/templates/controllers/upgrade_controller.rb
cbac-0.5.1 generators/cbac/templates/controllers/upgrade_controller.rb