Sha256: 9d47f2d4f64ddd86916ed4bbe756cdb9a4de958be48c1263df01005e17a5ee64

Contents?: true

Size: 767 Bytes

Versions: 3

Compression:

Stored size: 767 Bytes

Contents

require 'active_record'
require 'active_support'
require 'action_controller'

require 'authorizable/permission_utilities'
require 'authorizable/permissions'
require 'authorizable/controller'
require 'authorizable/model'
require 'authorizable/version'

module Authorizable
  OBJECT = PermissionUtilities::OBJECT
  ACCESS = PermissionUtilities::ACCESS

  def self.definitions
    Authorizable::Permissions.definitions || {}
  end
end

# add authorizable method to ActionController
ActionController::Base.send(:include, Authorizable::Controller)
# class ActionController::Base
#   include Authorizable::Controller

#   def self.authorizable
#     ap 'wat'
#   end
# end

# add authorizable method to ActiveModel
# ActiveRecord::Base.send( :extend, Authorizable::Model )

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
authorizable-0.9.2 lib/authorizable.rb
authorizable-0.9.1 lib/authorizable.rb
authorizable-0.9.0 lib/authorizable.rb