app/models/mail_notify.rb in parlement-0.4 vs app/models/mail_notify.rb in parlement-0.5
- old
+ new
@@ -68,13 +68,13 @@
#
# The algo used is simple: find a parent id smaller than the usually auto
# generated ids
#
def mailing_list(elt)
- e = elt
- while e.id.size > 21 and e.parent_id != 'ROOT'
- e = e.parent
+ if (elt.id.size > 21 and elt.parent_id != 'ROOT') then
+ mailing_list elt.parent
+ else
+ elt
end
- e
end
end