app/models/user.rb
def documents
    @documents ||= (self.notes + self.checklists + self.linksets).sort_by do |d|
      -d.updated_at.to_i
    end
  end
# Returns an Array containing documents of all kind
# that belongs to the user.
Returns an Array containing documents of all kind
that belongs to the user.
Returns an Array containing documents of all kind that belongs to the user .
def documents
    @documents ||= (self.notes + self.checklists + self.linksets).sort_by do |d|
      -d.updated_at.to_i
    end
  end
def documents @documents ||= ( self . notes + self . checklists + self . linksets ) . sort_by do | d | - d . updated_at . to_i end end
Returns an Array containing documents of all kind
that belongs to the user.
Returns an Array containing documents of all kind that belongs to the user .