Skip to content

Instantly share code, notes, and snippets.

@adambeynon
Last active January 2, 2016 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adambeynon/8307621 to your computer and use it in GitHub Desktop.
Save adambeynon/8307621 to your computer and use it in GitHub Desktop.
require 'opal'
require 'rails_templates'
p Template.paths
# => ['login', 'logout', 'user', 'user/new']
<% %[login logout user user/new].each do |tmpl| %>
<%= Opal::ERB.compile(File.read("#{Rails.root}/app/views/#{tmpl}.erb"), "#{tmpl}.erb") %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment