Support mixin for models subclassed from ActiveRecord::Base providing a core out-of-box Hoodoo data access security model. See Hoodoo::ActiveRecord::Secure::ClassMethods#secure for details.
See also:
- MODULE Hoodoo::ActiveRecord::Secure::ClassMethods
- CLASS Hoodoo::ActiveRecord::Secure::SecurityHelper
OBJECT_EQLS_STAR | = | Hoodoo::ActiveRecord::Secure::SecurityHelper::eqls_wildcard( '*' ) |
Convenience constant defining an equals-single-security-value wildcard security exemption using the String '*'. |
||
ENUMERABLE_INCLUDES_STAR | = | Hoodoo::ActiveRecord::Secure::SecurityHelper::includes_wildcard( '*' ) |
Convenience constant defining an included-in-enumerable-security-value wildcard security excemption using the String '*'. |
Instantiates this module when it is included.
Example:
class SomeModel < ActiveRecord::Base
include Hoodoo::ActiveRecord::Secure
# ...
end
model
-
The ActiveRecord::Base descendant that is including this module.
Source: show
# File lib/hoodoo/active/active_record/secure.rb, line 39 def self.included( model ) model.class_attribute( :nz_co_loyalty_hoodoo_secure_with, { :instance_predicate => false, :instance_accessor => false } ) instantiate( model ) unless model == Hoodoo::ActiveRecord::Base super( model ) end
When instantiated in an ActiveRecord::Base subclass, all of the Hoodoo::ActiveRecord::Secure::ClassMethods methods are defined as class methods on the including class.
model
-
The ActiveRecord::Base descendant that is including this module.
Source: show
# File lib/hoodoo/active/active_record/secure.rb, line 59 def self.instantiate( model ) model.extend( ClassMethods ) end