Update README.md with default environment (#1879)

Smaller projects, especially when upgrading from earlier versions, may not need different environment scopes, so just adding to the docs.
This commit is contained in:
Benjamin Stein
2025-01-10 14:28:46 -05:00
committed by GitHub
parent b4667adadf
commit a5b91e83ae
+1 -1
View File
@@ -91,7 +91,7 @@ Liquid::Template.parse(<<~LIQUID, environment: email_environment)
LIQUID
```
By using Environments, you ensure that custom tags and filters are only available in the contexts where they are needed, making your Liquid templates more robust and easier to manage.
By using Environments, you ensure that custom tags and filters are only available in the contexts where they are needed, making your Liquid templates more robust and easier to manage. For smaller projects, a global environment is available via `Liquid::Environment.default`.
### Error Modes