Files
openfoodnetwork/app/models/spree/state_change.rb
2020-09-17 14:06:50 +01:00

18 lines
322 B
Ruby

# frozen_string_literal: true
module Spree
class StateChange < ActiveRecord::Base
belongs_to :user
belongs_to :stateful, polymorphic: true
before_create :assign_user
def <=>(other)
created_at <=> other.created_at
end
def assign_user
true # don't stop the filters
end
end
end