mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 18:30:40 -07:00
Change to named parameter
This commit is contained in:
@@ -419,8 +419,8 @@ module Liquid
|
||||
result.is_a?(BigDecimal) ? result.to_f : result
|
||||
end
|
||||
|
||||
def default(input, default_value = ''.freeze, false_as_missing = true)
|
||||
if (false_as_missing ? !input : input.nil?) || input.respond_to?(:empty?) && input.empty?
|
||||
def default(input, default_value = ''.freeze, allow_false: false)
|
||||
if (allow_false ? input.nil? : !input) || input.respond_to?(:empty?) && input.empty?
|
||||
default_value
|
||||
else
|
||||
input
|
||||
|
||||
Reference in New Issue
Block a user