Replies: 2 comments
-
Here's a demo implementation: module Tilt
class BootstrapEmail < ERBTemplate
self.default_mime_type = 'text/html'
def prepare
super
require 'bootstrap-email'
end
def evaluate(_scope, _locals, &_block)
::BootstrapEmail::Compiler.new(super, type: :string).perform_full_compile
end
def allows_script?
false
end
end
end |
Beta Was this translation helpful? Give feedback.
0 replies
-
Cool! I don't know much about Tilt but that looks interesting. Im open to pull requests adding support for Tilt 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Tilt is a thin wrapper over various different template engines. By adding support for Tilt, support for apps built with Hanami, Roda, and other frameworks. Tilt also provides a few things that could be beneficial for performance as well, such as the ability to precompile templates.
I think the adapter could live in this repo, so users of Tilt could simply
require 'bootstrap-email/tilt
. Let me know your thoughts! Love this gem and it this feature would allow us to use it in prod. Cheers!Beta Was this translation helpful? Give feedback.
All reactions