0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
tilt-rails_erb adds supports ERB templates using Rails' ERB handler, which is different than standard ERB in that it supports using <tt><%= foo do %><% end %></tt> syntax and it auto-escapes output.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 5.1.0
>= 2.0.6
 Project Readme

tilt-rails_erb¶ ↑

tilt-rails_erb adds supports ERB templates using Rails’ 5.1 Erubi-based ERB handler, which is different than standard ERB in that it supports using <%= foo do %><% end %> syntax and it auto-escapes output.

Installation¶ ↑

gem install tilt-rails_erb

Source Code¶ ↑

Source code is available on GitHub at github.com/jeremyevans/tilt-rails_erb

Usage¶ ↑

require 'tilt/rails_erb'

The use case for tilt-rails_erb is in middleware in a Rails app that wants to share template files with the Rails app. Rails uses a non-standard ERB processor, and supports syntax that standard ERB doesn’t support. If you use that syntax in your Rails templates and want to share the templates with a middleware that uses tilt for renderning, you should use this library.

Note that this library makes the the Tilt::RailsERBTemplate the default Tilt .erb template handler, which can cause problems if you also use non-Rails ERB templates in the same application.

License¶ ↑

MIT

Author¶ ↑

Jeremy Evans <code@jeremyevans.net>