lib/active_recall/models/item.rb in active_recall-1.6.4 vs lib/active_recall/models/item.rb in active_recall-1.8.0
- old
+ new
@@ -1,21 +1,21 @@
# frozen_string_literal: true
module ActiveRecall
class Item < ActiveRecord::Base
- self.table_name = 'active_recall_items'
+ self.table_name = "active_recall_items"
belongs_to :deck
- scope :failed, -> { where(['box = ? and last_reviewed is not null', 0]) }
- scope :untested, -> { where(['box = ? and last_reviewed is null', 0]) }
+ scope :failed, -> { where(["box = ? and last_reviewed is not null", 0]) }
+ scope :untested, -> { where(["box = ? and last_reviewed is null", 0]) }
def self.expired(current_time: Time.current)
- where(['box > ? and next_review <= ?', 0, current_time])
+ where(["box > ? and next_review <= ?", 0, current_time])
end
def self.known(current_time: Time.current)
- where(['box > ? and next_review > ?', 0, current_time])
+ where(["box > ? and next_review > ?", 0, current_time])
end
def source
source_type.constantize.find(source_id)
end