Revision f706cc1d
Added by Marc Dequènes over 14 years ago
- ID f706cc1dcc9263550db2ca8219d705c9015ee535
lib/ldap_shadows/object.rb | ||
---|---|---|
protected
|
||
|
||
def before_save_jobs
|
||
check_hooks
|
||
check_hooks_before
|
||
check_missing_attributes
|
||
end
|
||
|
||
def check_hooks
|
||
def check_hooks_before
|
||
self.aspects.each do |aspect|
|
||
aklass = self.class.mapper.get_aspect_klass(aspect)
|
||
next if aklass.nil?
|
||
|
||
if self.new_entry?
|
||
aklass.hook_create(self.class.mapper, self)
|
||
aklass.hook_before_create(self.class.mapper, self)
|
||
else
|
||
aklass.hook_modify(self.class.mapper, self)
|
||
aklass.hook_before_modify(self.class.mapper, self)
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
[evol] fix and improve before hooks for aspects