Sha256: 0179d3b5bcf26dcf246a0560bbe5b78c864a2b75debc40df715584964133f355
Contents?: true
Size: 432 Bytes
Versions: 6
Compression:
Stored size: 432 Bytes
Contents
CanCan::ControllerAdditions.class_eval do # specs of #authorize_with_attributes! is written in authorize_admin in roles_controller_spec def authorize_with_attributes!(action, subject, attributes = []) attributes = attributes.keys if attributes.is_a?(Hash) if attributes.is_a? Array attributes.each { |attribute| authorize!(action, subject, attribute) } else authorize!(action, subject) end end end
Version data entries
6 entries across 6 versions & 1 rubygems