Sha256: 1949c13ee8b7fa69930983e5155d476ac1984d5d66b447c3f16c09a3bbf51808
Contents?: true
Size: 574 Bytes
Versions: 21
Compression:
Stored size: 574 Bytes
Contents
module Model module MongoDb module Customizable extend ActiveSupport::Concern included do # cache association as a shortcut belongs_to :product # for cases like f.object.send(association).klass.new in link_to_add_fields(name, f, association, options = {}) after_initialize :cache_product_association before_validation :cache_product_association private def cache_product_association raise NotImplementedError end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems