Sha256: 5afdf24332ebf6edaaf262b826a91ee44569cfbe0cc3b061b7d2cec1d8ed6f0c

Contents?: true

Size: 366 Bytes

Versions: 69

Compression:

Stored size: 366 Bytes

Contents

class Server
  include Mongoid::Document
  field :name, type: String
  field :after, type: Mongoid::Boolean, default: false
  belongs_to :node
  embeds_many :filesystems, validate: false
  accepts_nested_attributes_for :filesystems
  validates :name, presence: { allow_blank: false }

  after_create do |server|
    server.update_attribute(:after, !after)
  end
end

Version data entries

69 entries across 64 versions & 3 rubygems

Version Path
mongoid-7.0.13 spec/app/models/server.rb
mongoid-7.0.12 spec/app/models/server.rb
mongoid-6.4.8 spec/app/models/server.rb
mongoid-7.0.11 spec/app/models/server.rb
mongoid-7.0.10 spec/app/models/server.rb
mongoid-6.4.7 spec/app/models/server.rb
mongoid-6.4.5 spec/app/models/server.rb
mongoid-7.0.8 spec/app/models/server.rb
mongoid-7.0.7 spec/app/models/server.rb
mongoid-7.0.6 spec/app/models/server.rb
mongoid-5.4.1 spec/app/models/server.rb
mongoid-7.0.5 spec/app/models/server.rb
mongoid-7.0.4 spec/app/models/server.rb
mongoid-6.4.4 spec/app/models/server.rb
mongoid-7.0.3 spec/app/models/server.rb
mongoid-6.4.2 spec/app/models/server.rb
mongoid-7.0.2 spec/app/models/server.rb
mongoid-7.0.1 spec/app/models/server.rb
mongoid-6.4.1 spec/app/models/server.rb
mongoid-5.4.0 spec/app/models/server.rb