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

Version Path
ish_models-0.0.33.269 lib/office/action.rb
ish_models-0.0.33.268 lib/office/action.rb
ish_models-0.0.33.267 lib/office/action.rb
ish_models-0.0.33.266 lib/office/action.rb
ish_models-0.0.33.265 lib/office/action.rb
ish_models-0.0.33.264 lib/office/action.rb
ish_models-0.0.33.263 lib/office/action.rb
ish_models-0.0.33.262 lib/office/action.rb
ish_models-0.0.33.261 lib/office/action.rb
ish_models-0.0.33.260 lib/office/action.rb
ish_models-0.0.33.259 lib/office/action.rb
ish_models-0.0.33.258 lib/office/action.rb
ish_models-0.0.33.257 lib/office/action.rb
ish_models-0.0.33.256 lib/office/action.rb
ish_models-0.0.33.255 lib/office/action.rb
ish_models-0.0.33.254 lib/office/action.rb
ish_models-0.0.33.253 lib/office/action.rb
ish_models-0.0.33.252 lib/office/action.rb
ish_models-0.0.33.251 lib/office/action.rb
ish_models-0.0.33.250 lib/office/action.rb