Sha256: 50674aa8d1b43e6e7fe22e2cc05608ca6b54754de44196b7428c32381815c3d0

Contents?: true

Size: 448 Bytes

Versions: 2

Compression:

Stored size: 448 Bytes

Contents

class Iro::Purse
  include Mongoid::Document
  include Mongoid::Timestamps
  store_in collection: 'iro_purses'

  field :slug
  validates :slug, presence: true, uniqueness: true
  index({ slug: -1 }, { unique: true })

  has_many :positions, class_name: 'Iro::Position', inverse_of: :purse

  field :unit,             type: :integer
  field :height,           type: :integer
  field :mark_every_n_usd, type: :float

  def to_s
    slug
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.22 app/models/iro/purse.rb
iron_warbler-2.0.7.21 app/models/iro/purse.rb