Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use limits

  • Loading branch information...
commit 0cd40b0ca8c5c76f18299925177c39e72891b1ea 1 parent 740b9c1
@avsej avsej authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/link.rb
View
4 app/models/link.rb
@@ -40,7 +40,7 @@ def save
end
def self.popular
- by_view_count(:descending => true).to_a
+ by_view_count(:descending => true, :limit => 10).to_a
end
def self.my(session_id)
@@ -48,7 +48,7 @@ def self.my(session_id)
end
def self.recent
- by_created_at(:descending => true).to_a
+ by_created_at(:descending => true, :limit => 10).to_a
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.