Commit 6f0725119c87efaab0b97953c02499678ae48ea2

Authored by Alexander Vagin
1 parent a4cbdbb1

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

…d in project settings
Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
app/helpers/compare_helper.rb
1 1 module CompareHelper
2 2 def compare_to_mr_button?
3   - params[:from].present? && params[:to].present? &&
  3 + @project.merge_requests_enabled &&
  4 + params[:from].present? &&
  5 + params[:to].present? &&
4 6 @repository.branch_names.include?(params[:from]) &&
5 7 @repository.branch_names.include?(params[:to]) &&
6 8 params[:from] != params[:to] &&
... ...