Skip to content

Commit 49a8141

Browse files
committed
Remove the Version.invalid_changes relation
The definition of this relation no longer really makes sense, and also isn't used.
1 parent 03f5046 commit 49a8141

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

app/models/version.rb

-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ class Version < ApplicationRecord
4848
# legitimate scenario.
4949
belongs_to :page, foreign_key: :page_uuid, optional: true, inverse_of: :versions, touch: true
5050
has_many :tracked_changes, class_name: 'Change', foreign_key: 'uuid_to'
51-
has_many :invalid_changes,
52-
->(version) { where.not(uuid_from: version.previous.uuid) },
53-
class_name: 'Change',
54-
foreign_key: 'uuid_to'
5551

5652
# HTTP header names are case-insensitive. Store them lower-case for easy lookups/comparisons.
5753
normalizes :headers, with: ->(h) { h.transform_keys { |k| k.to_s.downcase } }

0 commit comments

Comments
 (0)