Sha256: b7858e56d7c7f308c3e5fef920be9323a9ca61f4ac2c64d49fbfd2849cd1a50b
Contents?: true
Size: 672 Bytes
Versions: 24
Compression:
Stored size: 672 Bytes
Contents
# frozen_string_literal: true require "store_model/ext/parent_assignment" module StoreModel # ActiveModel::Attributes patch with parent tracking support module Attributes include ParentAssignment private def attribute(*) super.tap do |value| assign_parent_to_store_model_relation(value) end end if Rails::VERSION::MAJOR >= 7 def _write_attribute(*) super.tap do |value| assign_parent_to_store_model_relation(value) end end else def write_attribute(*) super.tap do |value| assign_parent_to_store_model_relation(value) end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems