Sha256: 5d86860b0d8f7f372f2c100de3ca90d11f74268611478f981ad870bcdb578da8
Contents?: true
Size: 446 Bytes
Versions: 18
Compression:
Stored size: 446 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 observable :custom def do_something run_callbacks(:custom) do self.name = "custom" end end end require "app/models/actress"
Version data entries
18 entries across 18 versions & 3 rubygems