Sha256: 8c6dee9c75aa2fa3a5b634f40e0da6bf5fc5452e4122fb9ea8aaf379e2b367db

Contents?: true

Size: 323 Bytes

Versions: 12

Compression:

Stored size: 323 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

  def to_s
    slug
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
iron_warbler-2.0.7.20 app/models/iro/purse.rb
iron_warbler-2.0.7.19 app/models/iro/purse.rb
iron_warbler-2.0.7.18 app/models/iro/purse.rb
iron_warbler-2.0.7.17 app/models/iro/purse.rb
iron_warbler-2.0.7.16 app/models/iro/purse.rb
iron_warbler-2.0.7.15 app/models/iro/purse.rb
iron_warbler-2.0.7.14 app/models/iro/purse.rb
iron_warbler-2.0.7.13 app/models/iro/purse.rb
iron_warbler-2.0.7.12 app/models/iro/purse.rb
iron_warbler-2.0.7.11 app/models/iro/purse.rb
iron_warbler-2.0.7.10 app/models/iro/purse.rb
iron_warbler-2.0.7.9 app/models/iro/purse.rb