Changeset 1181

Show
Ignore:
Timestamp:
07/11/08 12:36:23 (6 months ago)
Author:
alban
Message:

Tri des documents d'un Podcast par id (en inverse). Refs #12

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/models/podcast.rb

    r1135 r1181  
    88        end 
    99  end 
    10    
     10 
    1111  def date 
    12         return Time.now if documents.empty?  
     12        return Time.now if documents.empty? 
    1313        documents.first.updated_at 
    1414  end 
    15    
     15 
    1616  def documents 
    17     self.author.find_documents(:tags => self.tags) 
     17    self.author.find_documents(:tags => self.tags, :order_by => :id).reverse 
    1818  end 
    19          
     19 
    2020end