Permalink
Browse files

get profile gems in one request

  • Loading branch information...
1 parent 990b3e7 commit 860f9ba598717c13d22218e183fe86dca7af0503 @toy toy committed with qrush Mar 21, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/controllers/profiles_controller.rb
@@ -6,8 +6,9 @@ def edit
def show
@user = User.find_by_slug!(params[:id])
- @rubygems = @user.rubygems_downloaded(10)
- @extra_rubygems = @user.rubygems_downloaded(nil, 10).to_a
+ rubygems = @user.rubygems_downloaded
+ @rubygems = rubygems.slice!(0, 10)
+ @extra_rubygems = rubygems
end
def update

0 comments on commit 860f9ba

Please sign in to comment.