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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b83f978a503c9b2dc8d75c153fa4442b7b63534f1bbccbb5f18c5d38576e4f9e
4
- data.tar.gz: 55be412316a8b2f77854d235fa0e73994efc0463afe5e4c428f253f74e801efd
3
+ metadata.gz: 8177fef2ccf96ffc5a4ec4c6c4a35ad553af43bb620132c734ff29eaf9947990
4
+ data.tar.gz: 7e055537fc620a7227502ff0e0c2b99db1753cc1be5d4a384bb5e8d179b06a8a
5
5
  SHA512:
6
- metadata.gz: b8deb2e788b721c376f1ce28e49be2e17dc120fcb85cc3fd0eaeb7dd6cf6e4eb609c89766ceefd53e65bc0e8b28425337a09bc3fdedcf57800d295a126520252
7
- data.tar.gz: e7b826f752bed82704edc395214bacd80d5fd94e4fe828f8bad563aff8ad571551725d35d687c236f04f7d1930ea064f669a4b012c9e060700ffd1e0df381042
6
+ metadata.gz: 59999a3e84db489a6d4052c1df9bb99a255c954116e837982df837e8c1d4198e0753738028a52db20a11468c82fd436a322ebe9eeac8885f3a10afefdb33ca7d
7
+ data.tar.gz: b249d23bbd2f286602c07f41ba1dde323c493310a644edf5b210f24df68d0beb56abebcadfe0b785d78b6df3a8834e8e35cb281f7a47bc696fed6cd7dd9a8e8e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_recall (1.2.2)
4
+ active_recall (1.3.0)
5
5
  activerecord (>= 5.2.3)
6
6
  activesupport (>= 5.2.3)
7
7
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecall
4
- VERSION = '1.2.2'
4
+ VERSION = '1.3.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_recall
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Gravina