Skip to content

Commit

Permalink
Rescue ArgumentError leaked from the date filter
Browse files Browse the repository at this point in the history
This monkey-patches a bug in Liquid filed at Shopify/liquid#632.

Fixes huginn#933.
  • Loading branch information
knu committed Jul 24, 2015
1 parent 6fcbc51 commit 5271f17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/concerns/liquid_interpolatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ def regex_replace_first(input, regex, replacement = nil)
input.to_s.sub(Regexp.new(regex), unescape_replacement(replacement.to_s))
end

def date(input, format)
super
rescue ArgumentError
input
end

private

def logger
Expand Down

0 comments on commit 5271f17

Please sign in to comment.