OSDN Git Service

fixed bug with branch/commit detection in select
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>
Mon, 20 Feb 2012 08:38:03 +0000 (10:38 +0200)
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>
Mon, 20 Feb 2012 08:38:03 +0000 (10:38 +0200)
app/helpers/application_helper.rb

index 0d43505..aec3dd5 100644 (file)
@@ -54,7 +54,7 @@ module ApplicationHelper
 
     # If reference is commit id - 
     # we should add it to branch/tag selectbox
-    if(@ref && !options.include?(@ref) &&
+    if(@ref && !options.flatten.include?(@ref) &&
        @ref =~ /^[0-9a-zA-Z]{6,52}$/)
       options << ["Commit", [@ref]]
     end