Sha256: d63aa3370c458047e755c137623f09c5c8d6d271816f197c70312501a2422584
Contents?: true
Size: 661 Bytes
Versions: 7
Compression:
Stored size: 661 Bytes
Contents
class IndexController < ApplicationController def show is_colloquial = determinator.feature_flag_on?(:colloquial_welcome) emoji = determinator.which_variant(:welcome_emoji) message = [ is_colloquial ? "hi world" : "hello world", (emoji if emoji) ].compact.join(" ") explain = "An experiment and a feature flag are being checked for the user with guid #{guid}. " explain += "The feature flag (colloquial_welcome) is #{is_colloquial ? 'on' : 'off'}. " explain += "The experiment (welcome_emoji) returned #{emoji}#{", so is omitted" unless emoji}." render json: { welcome: message, explanation: explain } end end
Version data entries
7 entries across 7 versions & 1 rubygems