Sha256: a62be7c9150384b5789c570a0ff8b540f8bd46291cb29059a44aa3a60c5a8cf5

Contents?: true

Size: 277 Bytes

Versions: 1

Compression:

Stored size: 277 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

1 entries across 1 versions & 1 rubygems

Version Path
abilities-0.1.1 lib/abilities/action_view/base.rb