Skip to content

Commit

Permalink
Remove URL hacks for Liquid
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Jul 22, 2024
1 parent fd9edc2 commit 63c62bb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
3 changes: 0 additions & 3 deletions lib/developer_portal/config/initializers/liquid.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# frozen_string_literal: true
require 'liquid'
require 'liquid/url_helper_hacks'


# allow calling present? in {% if %}
Liquid::Expression::LITERALS['present'] = :present?

Rails.application.config.to_prepare do
# Hacks
ActionView::Helpers.send(:include, Liquid::UrlHelperHacks)

[
Liquid::Filters::GoogleAnalytics,
Expand Down
2 changes: 2 additions & 0 deletions lib/developer_portal/lib/liquid/drops/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def request_uri
@request.original_url
end

alias original_url request_uri

desc "Returns the host with port of the request."
def host_with_port
@request.host_with_port
Expand Down
29 changes: 0 additions & 29 deletions lib/developer_portal/lib/liquid/url_helper_hacks.rb

This file was deleted.

0 comments on commit 63c62bb

Please sign in to comment.