Fixed Ruby to use exclude
This commit is contained in:
parent
68c9981013
commit
c240cad59a
2 changed files with 2 additions and 2 deletions
|
@ -262,7 +262,7 @@ class ProjectsController < Projects::ApplicationController
|
|||
|
||||
# If reference is commit id - we should add it to branch/tag selectbox
|
||||
ref = params[:ref]
|
||||
if ref && !options.flatten.include?(ref) && ref =~ /\A[0-9a-zA-Z]{6,52}\z/
|
||||
if ref && options.flatten.exclude?(ref) && ref =~ /\A[0-9a-zA-Z]{6,52}\z/
|
||||
options['Commits'] = [ref]
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- @options && @options.each do |key, value|
|
||||
= hidden_field_tag key, value, id: nil
|
||||
.dropdown
|
||||
= dropdown_toggle dropdown_toggle_text, { toggle: "dropdown", selected: @ref || @project.default_branch, ref: @ref, refs_url: refs_namespace_project_path(@project.namespace, @project) }, { toggle_class: "js-project-refs-dropdown" }
|
||||
= dropdown_toggle dropdown_toggle_text, { toggle: "dropdown", selected: dropdown_toggle_text, ref: @ref, refs_url: refs_namespace_project_path(@project.namespace, @project) }, { toggle_class: "js-project-refs-dropdown" }
|
||||
.dropdown-menu.dropdown-menu-selectable{ class: ("dropdown-menu-align-right" if local_assigns[:align_right]) }
|
||||
= dropdown_title "Switch branch/tag"
|
||||
= dropdown_filter "Search branches and tags"
|
||||
|
|
Loading…
Reference in a new issue