active_recall 1.2.2 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/active_recall/models/item.rb +4 -1
- data/lib/active_recall/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8177fef2ccf96ffc5a4ec4c6c4a35ad553af43bb620132c734ff29eaf9947990
|
4
|
+
data.tar.gz: 7e055537fc620a7227502ff0e0c2b99db1753cc1be5d4a384bb5e8d179b06a8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59999a3e84db489a6d4052c1df9bb99a255c954116e837982df837e8c1d4198e0753738028a52db20a11468c82fd436a322ebe9eeac8885f3a10afefdb33ca7d
|
7
|
+
data.tar.gz: b249d23bbd2f286602c07f41ba1dde323c493310a644edf5b210f24df68d0beb56abebcadfe0b785d78b6df3a8834e8e35cb281f7a47bc696fed6cd7dd9a8e8e
|
data/Gemfile.lock
CHANGED
@@ -5,7 +5,6 @@ module ActiveRecall
|
|
5
5
|
self.table_name = 'active_recall_items'
|
6
6
|
|
7
7
|
belongs_to :deck
|
8
|
-
belongs_to :source, polymorphic: true
|
9
8
|
|
10
9
|
scope :failed, -> { where(['box = ? and last_reviewed is not null', 0]) }
|
11
10
|
scope :untested, -> { where(['box = ? and last_reviewed is null', 0]) }
|
@@ -18,6 +17,10 @@ module ActiveRecall
|
|
18
17
|
where(['box > ? and next_review > ?', 0, current_time])
|
19
18
|
end
|
20
19
|
|
20
|
+
def source
|
21
|
+
source_type.constantize.find(source_id)
|
22
|
+
end
|
23
|
+
|
21
24
|
def right!
|
22
25
|
update!(algorithm_class.right(scoring_attributes))
|
23
26
|
end
|