diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-07 19:19:21 +0300 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-07-19 21:30:10 +0300 |
commit | 766f9cf2202e7dbab758db4e03bc0e82500943eb (patch) | |
tree | ea32b90efaa908a95f8d0b55319c0e62fdda1312 /app/helpers | |
parent | 81e57e783e8882de21d27d9191c09404ed7faca3 (diff) |
implements the basic filter functionality
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/branches_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/branches_helper.rb b/app/helpers/branches_helper.rb index bfd23aa4e04..3fc85dc6b2b 100644 --- a/app/helpers/branches_helper.rb +++ b/app/helpers/branches_helper.rb @@ -9,6 +9,17 @@ module BranchesHelper end end + def filter_branches_path(options = {}) + exist_opts = { + search: params[:search], + sort: params[:sort] + } + + options = exist_opts.merge(options) + + namespace_project_branches_path(@project.namespace, @project, @id, options) + end + def can_push_branch?(project, branch_name) return false unless project.repository.branch_exists?(branch_name) |