Mercurial > hg > soundsoftware-site
annotate .svn/pristine/ae/aea86446e90f5223c778c46b31f7dc023774621a.svn-base @ 976:0befb332f41a get_statistics
get stats up to current date
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 25 Oct 2012 13:50:45 +0100 |
parents | cbb26bc654de |
children |
rev | line source |
---|---|
Chris@909 | 1 class Category < ActiveRecord::Base |
Chris@909 | 2 acts_as_nested_set |
Chris@909 | 3 |
Chris@909 | 4 def to_s |
Chris@909 | 5 name |
Chris@909 | 6 end |
Chris@909 | 7 |
Chris@909 | 8 def recurse &block |
Chris@909 | 9 block.call self, lambda{ |
Chris@909 | 10 self.children.each do |child| |
Chris@909 | 11 child.recurse &block |
Chris@909 | 12 end |
Chris@909 | 13 } |
Chris@909 | 14 end |
Chris@909 | 15 end |