Sha256: b6c1d70b3ec94db4147a4a7d7d830ed555887ccce92a07053e6bbe5a9a3ac6e0
Contents?: true
Size: 474 Bytes
Versions: 13
Compression:
Stored size: 474 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 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
13 entries across 13 versions & 2 rubygems