diff options
author | Rubén Dávila <rdavila84@gmail.com> | 2016-01-18 12:46:23 -0500 |
---|---|---|
committer | Rubén Dávila <rdavila84@gmail.com> | 2016-01-20 00:17:21 -0500 |
commit | 91bd0bf99e0e25351c19bec28f9e5264a2fc469d (patch) | |
tree | d88a069f4e21c6f63b0536218016d20a5089f537 /app/controllers | |
parent | ed4934dbca5a12001c13d804dd25775274dec8e7 (diff) | |
download | gitlab-ce-91bd0bf99e0e25351c19bec28f9e5264a2fc469d.tar.gz |
Some CSS and sorting fixes.
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/forks_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/forks_controller.rb b/app/controllers/projects/forks_controller.rb index f6fabba26f9..e61e01c4a59 100644 --- a/app/controllers/projects/forks_controller.rb +++ b/app/controllers/projects/forks_controller.rb @@ -4,8 +4,8 @@ class Projects::ForksController < Projects::ApplicationController before_action :authorize_download_code! def index - @all_forks = project.forks.includes(:creator) - @all_forks = @all_forks.sort(params[:sort]) if params[:sort] + @sort = params[:sort] || 'id_desc' + @all_forks = project.forks.includes(:creator).order_by(@sort) @public_forks, @protected_forks = @all_forks.partition do |project| can?(current_user, :read_project, project) |