Sha256: 8aec3b34cda6753ee4c159583c56c1d4153f035db4d15b4d3796a1e370468c4e
Contents?: true
Size: 651 Bytes
Versions: 11
Compression:
Stored size: 651 Bytes
Contents
module ActiveLdap module AttributeMethods extend ActiveSupport::Concern include ActiveModel::AttributeMethods def methods(singleton_methods = true) target_names = entry_attribute.all_names target_names -= ['objectClass', 'objectClass'.underscore] super + target_names.uniq.collect do |attr| self.class.attribute_method_matchers.collect do |matcher| :"#{matcher.prefix}#{attr}#{matcher.suffix}" end end.flatten end private # overiding ActiveModel::AttributeMethods def attribute_method?(method_name) have_attribute?(method_name, ['objectClass']) end end end
Version data entries
11 entries across 11 versions & 1 rubygems