diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-08-31 14:35:23 +0300 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-08-31 21:16:47 +0300 |
commit | 97b69862ad50936ad0700b23c485a38b637469a7 (patch) | |
tree | 5a5ecf4da4105b7c7b2f1da96d65594ab7704ac6 /app/controllers/projects/tags_controller.rb | |
parent | 6c9c33f43e489d9e225bc64342c7d7d0a558b1e7 (diff) |
add specs for tags finder
Diffstat (limited to 'app/controllers/projects/tags_controller.rb')
-rw-r--r-- | app/controllers/projects/tags_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index 3e5de2e0d3e..6ea8ee62bc5 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -1,5 +1,6 @@ class Projects::TagsController < Projects::ApplicationController include SortingHelper + # Authorize before_action :require_non_empty_project before_action :authorize_download_code! @@ -7,7 +8,9 @@ class Projects::TagsController < Projects::ApplicationController before_action :authorize_admin_project!, only: [:destroy] def index - @sort = params[:sort] || 'name' + params[:sort] = params[:sort].presence || 'name' + + @sort = params[:sort] @tags = TagsFinder.new(@repository, params).execute @tags = Kaminari.paginate_array(@tags).page(params[:page]) |