Title / Description
Code def children(limit = nil) found = articles.find(:all, :limit => limit, :order => 'updated_at desc') found += pages.find(:all, :limit => limit, :order => 'updated_at desc') found.sort! { |x, y| y.updated_at <=> x.updated_at } limit ? found[0, limit] : found end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code