Sha256: abd038a4ad4de71889cc35049e1fae8a952a58baa08785212c1428e689bd338e

Contents?: true

Size: 425 Bytes

Versions: 73

Compression:

Stored size: 425 Bytes

Contents

class Actor
  include Mongoid::Document
  field :name
  field :after_custom_count, type: Integer, default: 0
  has_and_belongs_to_many :tags
  embeds_many :things, validate: false, cascade_callbacks: true
  accepts_nested_attributes_for :things, allow_destroy: true

  define_model_callbacks :custom

  def do_something
    run_callbacks(:custom) do
      self.name = "custom"
    end
  end
end

require "app/models/actress"

Version data entries

73 entries across 68 versions & 6 rubygems

Version Path
mongoid-6.0.1 spec/app/models/actor.rb
mongoid-5.1.5 spec/app/models/actor.rb
mongoid-6.0.0 spec/app/models/actor.rb
mongoid-5.1.4 spec/app/models/actor.rb
mongoid-6.0.0.rc0 spec/app/models/actor.rb
mongoid-6.0.0.beta spec/app/models/actor.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-5.1.3/spec/app/models/actor.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-4.0.2/spec/app/models/actor.rb
mongoid-5.1.3 spec/app/models/actor.rb
mongoid-5.1.2 spec/app/models/actor.rb
mongoid-5.1.1 spec/app/models/actor.rb
mongoid-5.1.0 spec/app/models/actor.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.1/spec/app/models/actor.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/mongoid-5.0.2/spec/app/models/actor.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/spec/app/models/actor.rb
mongoid-5.0.2 spec/app/models/actor.rb
mongoid-5.0.1 spec/app/models/actor.rb
mongoid-5.0.0 spec/app/models/actor.rb
mongoid-5.0.0.rc0 spec/app/models/actor.rb
mongoid-5.0.0.beta spec/app/models/actor.rb