codice:
class Asset

  def next
    first(:conditions => ["id > ?", id], :order => "id ASC")
  end

  def prev
    first(:conditions => ["id < ?", id], :order => "id ASC")
  end

end