lib/express_templates/template/handler.rb in express_templates-0.11.3 vs lib/express_templates/template/handler.rb in express_templates-0.11.4
- old
+ new
@@ -10,10 +10,10 @@
def call(template)
# call ripper stuff method
# returns a string to be eval'd
source = "(#{ExpressTemplates.compile(template)}).html_safe"
- warn_contains_logic(source) # pass the source code
+ warn_contains_logic(source) if ENV['NO_TEMPLATE_WARN'].nil? # pass the source code
source
end
def warn_contains_logic(compiled_template)
keywords = %w(if until unless case for do loop while) # array of conditional keywords