Commit 7da851e82c6d12d348d5383d84eba0aaff745d7d

Authored by MoisesMachado
1 parent fac34d85

ActionItem4: exetending the tag class


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@74 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 10 additions and 0 deletions   Show diff stats
lib/extended_tag.rb 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +class Tag
  2 + def descendents
  3 + children.inject([]){|des , child| des + child.descendents << child}
  4 + end
  5 +
  6 + def find_tag(*args)
  7 + find(*args).select{|t|!t.pending?}
  8 + end
  9 +
  10 +end
... ...