Fix bug with showing create merge request button while merge request are disabled in project settings

This commit is contained in:
Alexander Vagin 2013-12-04 11:02:36 +03:00
parent a4cbdbb10d
commit 6f0725119c
1 changed files with 3 additions and 1 deletions

View File

@ -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] &&