Sha256: 85036994fe36762f93db8e8c7b3f97c6a65bbc81dd83f7ec1a7e0cc12f513a00
Contents?: true
Size: 752 Bytes
Versions: 34
Compression:
Stored size: 752 Bytes
Contents
class Office::Action include Mongoid::Document include Mongoid::Timestamps store_in collection: 'office_actions' field :slug, type: :string validates :slug, uniqueness: true, allow_nil: true field :descr, type: :string ## optional STATE_ACTIVE = 'active' STATE_INACTIVE = 'inactive' STATES = [ STATE_ACTIVE, STATE_INACTIVE ] field :state, type: :string scope :active, ->{ where( state: STATE_ACTIVE ) } has_many :ties, class_name: '::Office::ActionTie', inverse_of: :office_action has_many :prev_ties, class_name: '::Office::ActionTie', inverse_of: :next_office_action accepts_nested_attributes_for :ties field :action_exe, type: :string field :perform_at, type: :time end OAct = Office::Action
Version data entries
34 entries across 34 versions & 1 rubygems