Permalink
Browse files

Fix bug with showing create merge request button while merge request …

…are disabled in project settings
  • Loading branch information...
PlugIN73 committed Dec 4, 2013
1 parent a4cbdbb commit 6f0725119c87efaab0b97953c02499678ae48ea2
Showing with 3 additions and 1 deletion.
  1. +3 −1 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] &&

0 comments on commit 6f07251

Please sign in to comment.