Class: RulesEngine::Process::ReProcessRun

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/rules_engine/process/runner/db_runner.rb

Class Method Summary collapse

Class Method Details

.history(plan_code, options = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/rules_engine/process/runner/db_runner.rb', line 13

def self.history(plan_code, options = {})

  klass = self
  klass = klass.by_plan_code(plan_code) unless plan_code.nil?
  klass = klass.by_process_status_gt(RulesEngine::Process::PROCESS_STATUS_NONE)
  klass = klass.order_started_at('DESC')
          
  klass.paginate({:page => 1, :per_page => 10}.merge(options))
end