Skip to content

Commit 56ae1fd

Browse files
committed
Fix example code in README
- A method that has `?` suffix should return boolean, but this method return an object that respond to `valid?`. - All other examples don't have `?`.
1 parent 8d9fd4e commit 56ae1fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require "scientist"
1212
class MyWidget
1313
def allows?(user)
1414
experiment = Scientist::Default.new "widget-permissions"
15-
experiment.use { model.check_user?(user).valid? } # old way
15+
experiment.use { model.check_user(user).valid? } # old way
1616
experiment.try { user.can?(:read, model) } # new way
1717

1818
experiment.run

0 commit comments

Comments
 (0)