diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2017-10-10 17:56:04 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-10-10 17:56:04 +0300 |
commit | 47d19c2de1df14bb3ab00d051be8e4f19f4ed7c4 (patch) | |
tree | a937896d47c846185e397528bdd6fa3e64ae78b9 /app/helpers | |
parent | 900dd7fa93ee9de3de767aa4bf5baca7e9f83348 (diff) |
Stop using `branch_names.include?` and use `branch_exists?`
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/compare_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/compare_helper.rb b/app/helpers/compare_helper.rb index 2c28dd81c87..8bf96c0905f 100644 --- a/app/helpers/compare_helper.rb +++ b/app/helpers/compare_helper.rb @@ -4,8 +4,8 @@ module CompareHelper to.present? && from != to && can?(current_user, :create_merge_request, project) && - project.repository.branch_names.include?(from) && - project.repository.branch_names.include?(to) + project.repository.branch_exists?(from) && + project.repository.branch_exists?(to) end def create_mr_path(from = params[:from], to = params[:to], project = @project) |