We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 074b502 + 9505242 commit b401721Copy full SHA for b401721
1 file changed
README.md
@@ -807,10 +807,16 @@ conduct experiments that are not tied to a web session.
807
```ruby
808
# create a new experiment
809
experiment = Split::ExperimentCatalog.find_or_create('color', 'red', 'blue')
810
+
811
+# find the user
812
+user = Split::User.find(user_id, :redis)
813
814
# create a new trial
-trial = Split::Trial.new(:experiment => experiment)
815
+trial = Split::Trial.new(user: user, experiment: experiment)
816
817
# run trial
818
trial.choose!
819
820
# get the result, returns either red or blue
821
trial.alternative.name
822
0 commit comments