simple_abs icon indicating copy to clipboard operation
simple_abs copied to clipboard

same alternative isn't always displayed to the user.

Open deneuxa opened this issue 11 years ago • 3 comments

I have this code :

    def search
       if ab_test('display_flash', [true, false])  #simple_abs
         flash[:notice]
       end
     end

When I refresh the search's page I randomly get the notice or not. I should have it always or never until I delete my cookies, shouldn't I ?

deneuxa avatar Apr 28 '14 19:04 deneuxa

Ah, I'm not sure I've tested this with boolean test values. What if instead you tested for

if ab_test('display_flash', ["true", "false"]) == "true"

end

To see if strings work.

n8 avatar Apr 28 '14 19:04 n8

OK, it seems this code works fine :

def search
   if ab_test('display_flash', ['true', 'false']) == 'true'  
     flash[:notice]
   end
 end

deneuxa avatar Apr 28 '14 19:04 deneuxa

We wrote our comments at the same time :)

deneuxa avatar Apr 28 '14 19:04 deneuxa