From 6f0725119c87efaab0b97953c02499678ae48ea2 Mon Sep 17 00:00:00 2001 From: Alexander Vagin <laplugin73@gmail.com> Date: Wed, 4 Dec 2013 11:02:36 +0300 Subject: [PATCH] Fix bug with showing create merge request button while merge request are disabled in project settings --- app/helpers/compare_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/helpers/compare_helper.rb b/app/helpers/compare_helper.rb index ea2540bf385..5ff19b88293 100644 --- a/app/helpers/compare_helper.rb +++ b/app/helpers/compare_helper.rb @@ -1,6 +1,8 @@ module CompareHelper def compare_to_mr_button? - params[:from].present? && params[:to].present? && + @project.merge_requests_enabled && + params[:from].present? && + params[:to].present? && @repository.branch_names.include?(params[:from]) && @repository.branch_names.include?(params[:to]) && params[:from] != params[:to] && -- 2.30.9