Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo of in Split::Trial class variable #644

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