Sha256: 568e76bda0caaee3345b9c125e78f79b514235c5e48a40fc946fc2cf6cdc13a3

Contents?: true

Size: 320 Bytes

Versions: 1

Compression:

Stored size: 320 Bytes

Contents

module Allowance
  module ActiveRecordExtensions
    def self.included(base)
      base.extend ClassMethods
    end

    module ClassMethods
      def allowed(subject, verb = nil)
        subject.allowed_scope(self, verb)
      end
    end
  end
end

ActiveRecord::Base.send(:include, Allowance::ActiveRecordExtensions)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
allowance-0.2.0 lib/allowance/activerecord_ext.rb