Skip to content

indigotechtutorials/render-erb-gem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Render ERB gem

A simple library for rendering erb templates and passing locals to the template.

render method

path_to_file = "home.html.erb"

message = "Hello World!"

render_template(path_to_file, message: message) # => HTML CONTENT.

/home.html.erb

<h1> <%= message %> </h1>

Installation steps

to use the render_template method in your app you must 1. install the gem. 2. require the gem in your file. 3. include the RenderErb module to access the render_template method.

Step 1.

bundle add render_erb

Step 2.

require "render_erb"

Step 3.

include RenderErb

About

A simple gem for rendering ERB templates with locals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages