mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 10:20:43 -07:00
Add strict_variables/strict_filters render options to check for undefined variables and filters
This commit is contained in:
+3
-2
@@ -24,8 +24,9 @@ module Liquid
|
||||
attr_writer :context
|
||||
|
||||
# Catch all for the method
|
||||
def liquid_method_missing(_method)
|
||||
nil
|
||||
def liquid_method_missing(method)
|
||||
return nil unless @context.strict_variables
|
||||
raise Liquid::UndefinedDropMethod, "undefined method #{method}"
|
||||
end
|
||||
|
||||
# called by liquid to invoke a drop
|
||||
|
||||
Reference in New Issue
Block a user