Sha256: 57bb6ad3bc720642f9aef011276262a5d48ca35ca30ee35b3a76a0b63dfc61a7

Contents?: true

Size: 425 Bytes

Versions: 9

Compression:

Stored size: 425 Bytes

Contents

class IndexController < ApplicationController
  def show
    is_colloquial = determinator.feature_flag_on?(:colloquial_welcome)
    emoji = determinator.which_variant(:welcome_emoji)

    if emoji
      # TODO: Track that this user saw a variant of this experiment
    end

    message = [
      is_colloquial ? "hi world" : "hello world",
      emoji
    ].compact.join(" ")

    render json: { welcome: message }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
determinator-0.12.1 examples/determinator-rails/app/controllers/index_controller.rb
determinator-0.12.0 examples/determinator-rails/app/controllers/index_controller.rb
determinator-0.11.1 examples/determinator-rails/app/controllers/index_controller.rb
determinator-0.11.0 examples/determinator-rails/app/controllers/index_controller.rb
determinator-0.10.0 examples/determinator-rails/app/controllers/index_controller.rb
determinator-0.9.1 examples/determinator-rails/app/controllers/index_controller.rb
determinator-0.8.0 examples/determinator-rails/app/controllers/index_controller.rb
determinator-0.7.0 examples/determinator-rails/app/controllers/index_controller.rb
determinator-0.6.2 examples/determinator-rails/app/controllers/index_controller.rb