Sha256: db561a771e8927f6f332f0cdc1f71be570e3140c428a48c9e0b77b6d4329ce64
Contents?: true
Size: 665 Bytes
Versions: 45
Compression:
Stored size: 665 Bytes
Contents
class Wco::OfficeAction include Mongoid::Document include Mongoid::Timestamps include Mongoid::Paranoia store_in collection: 'wco_office_actions' field :slug, type: :string validates :slug, uniqueness: true, allow_nil: true # field :descr, type: :string ## optional belongs_to :office_action_template, inverse_of: :office_action def tmpl office_action_template end STATUS_ACTIVE = 'active' STATUS_INACTIVE = 'inactive' STATUSS = [ STATUS_ACTIVE, STATUS_INACTIVE ] field :status, type: :string scope :active, ->{ where( status: STATUS_ACTIVE ) } field :perform_at, type: :time def to_s slug end end
Version data entries
45 entries across 45 versions & 1 rubygems