Skip to content

Commit

Permalink
Merge pull request #515 from stefsava/stefsava-patch-fix-attribute-es…
Browse files Browse the repository at this point in the history
…caping-deprecation-warning

Fix attribute escaping deprecation warning
  • Loading branch information
allmarkedup authored Aug 30, 2023
2 parents f947d67 + b439750 commit 1d0cebb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/components/lookbook/tag_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ def call
end

def self.escape_attribute_key
@escape_attribute_key ||= (Gem::Version.new(Rails.version) < Gem::Version.new("6.1.5.1")) ? :escape_attributes : :escape
@escape_attribute_key ||= (
(
Gem::Version.new(Rails.version) < Gem::Version.new("5.2.7.1")
) || (
Gem::Version.new(Rails.version) >= Gem::Version.new("6") &&
Gem::Version.new(Rails.version) < Gem::Version.new("6.1.5.1")
)
) ? :escape_attributes : :escape
end
end
end

0 comments on commit 1d0cebb

Please sign in to comment.