Method: Stall::Models::ProductList::ClassMethods#aborted

Defined in:
app/models/stall/models/product_list.rb

#aborted(options = {}) ⇒ Object

The .aborted and .finalized scopes cannot be declared as actual rails scopes since subclasses that override the .wizard method wouldn’t be taken into account, scopes being executed in the context of the declaring class



124
125
126
127
# File 'app/models/stall/models/product_list.rb', line 124

def aborted(options = {})
  where.not(state: wizard.steps.last)
    .older_than(options.fetch(:before, 1.day.ago))
end