-
Notifications
You must be signed in to change notification settings - Fork 5
Debugging permits
kristianmandrup edited this page Apr 15, 2012
·
1 revision
CanTango has the following class methods to make it easy to debug Permits from within anywhere in your app.
puts CanTango.permits_allowed
puts CanTango.permits_denied
puts CanTango.debug_permits_registry
puts CanTango.debug_ability current_user, :edit, Project.firstDebug Registration: Which permits have been registered and for which types?
CanTango.config.permits do |permits|
puts permits.registry_for :account_type # Registry for :account_type permits
puts permits.registered_for :account_type # names of AccountType permits
puts permits.all
puts permits.show_all
end