README.md in active_recall-1.8.6 vs README.md in active_recall-2.0.0
- old
+ new
@@ -1,10 +1,10 @@
# ActiveRecall
**ActiveRecall** is a spaced-repetition system that allows you to treat arbitrary [ActiveRecord](https://github.com/rails/rails/tree/master/activerecord) models as if they were flashcards to be learned and reviewed.
It it based on, and is intended to be backwards compatible with, the [okubo](https://github.com/rgravina/okubo) gem.
-The primary differentiating features are that it lets the user specify the scheduling algorithm and is fully compatible with Rails 6+ and Ruby 3+.
+The primary differentiating features are that it lets the user specify the scheduling algorithm and is fully compatible with (and requires) Rails 6+ and Ruby 3+.
## Installation
Add this line to your application's Gemfile:
@@ -33,11 +33,11 @@
```ruby
ActiveRecall.configure do |config|
config.algorithm_class = ActiveRecall::FibonacciSequence
end
```
-Algorithms include `FibonacciSequence`, `LeitnerSystem`, and `SoftLeitnerSystem`.
+Algorithms include `FibonacciSequence`, `LeitnerSystem`, `SoftLeitnerSystem`, and `SM2` (see [here](https://en.wikipedia.org/wiki/SuperMemo#Description_of_SM-2_algorithm)).
For Rails applications, try doing this from within an [initializer file](https://guides.rubyonrails.org/configuring.html#using-initializer-files).
Assume you have an application allowing your users to study words in a foreign language. Using the `has_deck` method you can set up a deck of flashcards that the user will study:
```ruby
@@ -57,11 +57,11 @@
```ruby
# Initially adding a word
user.words << word
user.words.untested #=> [word]
-# Guessing a word correctly
+# Guessing a word correctly (when using a binary algorithm)
user.right_answer_for!(word)
user.words.known #=> [word]
# Guessing a word incorrectly
user.wrong_answer_for!(word)
@@ -89,9 +89,19 @@
# Two weeks later...
user.words.expired #=> [word]
user.right_answer_for!(word)
# One month later...
user.words.expired #=> [word]
+```
+
+When using a gradable algorithm (rather than binary) such as the SM2 algorithm, you will need to supply your own grade along with the item:
+```ruby
+grade = 3
+user.score!(grade, word)
+
+# Using the binary-only methods will raise an error
+user.right_answer_for!(word)
+=> ActiveRecall::IncompatibleAlgorithmError
```
Reviewing
---------