Sha256: b97dbcaa81f89d4053fad192a830170e9e58a0ed3f224ceecf430ca5412fcec8

Contents?: true

Size: 278 Bytes

Versions: 5

Compression:

Stored size: 278 Bytes

Contents

module Abilities
  module ActionView
    module Base
      extend ActiveSupport::Concern

      %w(can? cannot?).each do |name|
        define_method name do |action, subject|
          Abilities.send name, current_user, action, subject
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
abilities-0.1.0 lib/abilities/action_view/base.rb
abilities-0.0.4 lib/abilities/action_view/base.rb
abilities-0.0.3 lib/abilities/action_view/base.rb
abilities-0.0.2 lib/abilities/action_view/base.rb
abilities-0.0.1 lib/abilities/action_view/base.rb