Class: Caboose::AbVariant
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Caboose::AbVariant
- Defined in:
- app/models/caboose/ab_variant.rb
Overview
Class for A-B testing variants. A variant is a set of changes to the same element on a page. For example, a variant can be used to change the button text, or images displayed, or even more complicated behavior
Instance Method Summary collapse
Instance Method Details
#random_option ⇒ Object
12 13 14 15 |
# File 'app/models/caboose/ab_variant.rb', line 12 def random_option return nil if self..nil? || self..count == 0 return self..sample end |