Skip to content

Commit

Permalink
remove irrelevant comments
Browse files Browse the repository at this point in the history
  • Loading branch information
quentindemetz committed Oct 17, 2024
1 parent e1e4c5e commit 62326c1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/batch_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ module ClassMethods
def batch_update(entries, columns:, batch_size: 100, validate: true)
columns = column_names if columns == :all
columns = (Array.wrap(columns).map(&:to_s) + %w[updated_at]).uniq
# + ::Auditable::ActiveRecord::AUDIT_LOG_UPDATED_COLUMNS).uniq

entries = entries.select { columns.intersect?(_1.changed) }
entries.each { _1.updated_at = Time.current } if has_attribute?('updated_at')

entries.each(&:validate!) if validate
# entries.each(&:mark_audit_log_update)

primary_keys = Array.wrap(primary_key).map(&:to_s)

Expand Down

0 comments on commit 62326c1

Please sign in to comment.