Skip to content

Latest commit

 

History

History
executable file
·
47 lines (31 loc) · 1.03 KB

README.md

File metadata and controls

executable file
·
47 lines (31 loc) · 1.03 KB

SlimERBBackport

If you are using Slim 4+ version and embedding ERB inside probably you have noticed that it doen'ts work.

This gem backports support for newer versions of Slim support for ERB.

Usage

Just continue using slim as before. You don't need to convert ERB into slim or move to partials.

h1 Index

= render 'p1'
= render 'p2'

erb:
  <h2>ERB in index.html.erb</h2>
  <script>
    console.log("hello world");
  </script>

Installation

Add this line to your application's Gemfile:

gem 'slim_erb_backport'

And then execute:

$ bundle

Contributing

You are welcome to contribute.

Big thank you to author of SLIM that he originally added support of ERB inside slim views.

License

The gem is available as open source under the terms of the MIT License.