Module: ActiveRecord::AttributeMethods::Dirty::ClassMethods

Defined in:
lib/active_record/attribute_methods/dirty.rb

Instance Method Summary collapse

Instance Method Details

#partial_writesObject



31
32
33
34
35
36
37
# File 'lib/active_record/attribute_methods/dirty.rb', line 31

def partial_writes
  ActiveSupport::Deprecation.warn(<<-MSG.squish)
    ActiveRecord::Base.partial_writes is deprecated and will be removed in Rails 7.1.
    Use `partial_updates` and `partial_inserts` instead.
  MSG
  partial_updates && partial_inserts
end

#partial_writes=(value) ⇒ Object



47
48
49
50
51
52
53
# File 'lib/active_record/attribute_methods/dirty.rb', line 47

def partial_writes=(value)
  ActiveSupport::Deprecation.warn(<<-MSG.squish)
    `ActiveRecord::Base.partial_writes=` is deprecated and will be removed in Rails 7.1.
    Use `partial_updates=` and `partial_inserts=` instead.
  MSG
  self.partial_updates = self.partial_inserts = value
end

#partial_writes?Boolean

Returns:

  • (Boolean)


39
40
41
42
43
44
45
# File 'lib/active_record/attribute_methods/dirty.rb', line 39

def partial_writes?
  ActiveSupport::Deprecation.warn(<<-MSG.squish)
    `ActiveRecord::Base.partial_writes?` is deprecated and will be removed in Rails 7.1.
    Use `partial_updates?` and `partial_inserts?` instead.
  MSG
  partial_updates? && partial_inserts?
end