Back to Projects
Ruby Rails ERB

Templates Rails

A simple templating system for Rails applications that allows developers to design views before implementation. Make your design decisions before you build your application views.

~1 minute read

About

Templates Rails is a gem I built to solve a common problem in Rails development: making design decisions before diving into implementation. Instead of building views directly into controllers and routes, you can create templates in a dedicated directory and access them via a simple engine.

The gem mounts a Rails engine that serves templates from app/views/templates, making them accessible at /templates. This lets you prototype layouts, test design ideas, and iterate on UI without touching your application's actual views or routes.

I use it extensively in mmtm projects as part of our design workflow. During the design phase, we experiment with layouts, components, and interactions to establish the foundations. Once the design is settled, these templates become a living reference we return to when implementing features—ensuring what we build matches what was designed. It supports nested directories, Rails helpers, and the asset pipeline, so templates feel just like regular Rails views and translate seamlessly into production code.