class Order < ActiveRecord::Base
enum :status, { pending: 0, paid: 1, shipped: 2, refunded: 3 }
def shippable?
paid? && !refunded?
end
end
Bit off-topic but if `:status` is an enum, then `paid? && !refunded?` is equivalent to `paid?`