Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/split/trial.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize(attrs = {})
@user = attrs.delete(:user)
@options = attrs

@alternative_choosen = false
@alternative_chosen = false
end

def metadata
Expand Down Expand Up @@ -54,7 +54,7 @@ def complete!(context = nil)
def choose!(context = nil)
@user.cleanup_old_experiments!
# Only run the process once
return alternative if @alternative_choosen
return alternative if @alternative_chosen

new_participant = @user[@experiment.key].nil?
if override_is_alternative?
Expand Down Expand Up @@ -91,7 +91,7 @@ def choose!(context = nil)
new_participant_and_cohorting_disabled = new_participant && @experiment.cohorting_disabled?

@user[@experiment.key] = alternative.name unless @experiment.has_winner? || !should_store_alternative? || new_participant_and_cohorting_disabled
@alternative_choosen = true
@alternative_chosen = true
run_callback context, Split.configuration.on_trial unless @options[:disabled] || Split.configuration.disabled? || new_participant_and_cohorting_disabled
alternative
end
Expand Down