lib/rrrspec/web/persistent_models.rb in rrrspec-web-0.2.0 vs lib/rrrspec/web/persistent_models.rb in rrrspec-web-0.2.1
- old
+ new
@@ -2,11 +2,16 @@
module RRRSpec
module Server
module Persistence
class Taskset
- scope :recent, order('finished_at DESC')
- scope :has_failed_slaves, includes(:slaves).where(slaves: {status: 'failure_exit'})
+ def self.recent
+ order('finished_at DESC')
+ end
+
+ def self.has_failed_slaves
+ includes(:slaves).where(slaves: {status: 'failure_exit'})
+ end
def as_json_with_no_relation
as_json(except: :id)
end
end