Skip to content

Commit

Permalink
Add comment to join node patch
Browse files Browse the repository at this point in the history
This patch is not required in Rails >= 7.1

Close #311

Ref:
- rails/rails#46864
- rails/rails@1d98bc5

[ci skip]
  • Loading branch information
tagliala committed Jun 2, 2024
1 parent 6e50ef2 commit 1f66ffa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/chrono_model/patches/join_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module ChronoModel
module Patches
# This class supports the AR 5.0 code that expects to receive an
# This class supports the AR < 7.1 code that expects to receive an
# Arel::Table as the left join node. We need to replace the node
# with a virtual table that fetches from the history at a given
# point in time, we replace the join node with a SqlLiteral node
Expand All @@ -12,6 +12,7 @@ module Patches
# it expects, yet producing SQL that fetches from history tables
# as-of-time.
#
# TODO: Remove when dropping Rails < 7.1 compatibility
class JoinNode < Arel::Nodes::SqlLiteral
attr_reader :name, :table_name, :table_alias, :as_of_time

Expand Down

0 comments on commit 1f66ffa

Please sign in to comment.