Sha256: b27712860017e4aff82ce031b737331f42323710e09c98783bf8cfb829b59ad0
Contents?: true
Size: 354 Bytes
Versions: 1
Compression:
Stored size: 354 Bytes
Contents
module Cancannible::AbilityPreloadAdapter extend ActiveSupport::Concern included do # Tap Ability.new to first preload permissions via Cancannible alias_method :cancan_initialize, :initialize def initialize(user) user.preload_abilities(self) if user.respond_to? :preload_abilities cancan_initialize(user) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cancannible-0.0.1 | lib/cancannible/ability_preload_adapter.rb |