Skip to content

Commit

Permalink
Merge pull request #190 from tricknotes/fix-readme
Browse files Browse the repository at this point in the history
Fix example code in README
  • Loading branch information
ekroon authored May 25, 2024
2 parents fc9d7c3 + 56ae1fd commit fcb5050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require "scientist"
class MyWidget
def allows?(user)
experiment = Scientist::Default.new "widget-permissions"
experiment.use { model.check_user?(user).valid? } # old way
experiment.use { model.check_user(user).valid? } # old way
experiment.try { user.can?(:read, model) } # new way

experiment.run
Expand Down

0 comments on commit fcb5050

Please sign in to comment.