DFE-Digital / rails-template

Rails 7 template with GOV.UK Frontend
27 stars 5 forks source link

Use add_template_repository_to_source_path #4

Closed tvararu closed 2 years ago

tvararu commented 2 years ago

Follow-up from https://github.com/DFE-Digital/rails-template/pull/3#pullrequestreview-967903357

This makes it actually possible to use Thor templates properly, as I originally intended (but didn't know how to do).

ERB files now need to use <%% for ERB that is meant to be passed as-is.

Also reorganise files in a way that makes more sense (standard Rails hierarchy instead of flat tmpl folder).

Clean up the template.rb a bit as well and use --force in the README example (which automatically overwrites).

Tested by running:

bin/rails app:template LOCATION=https://raw.githubusercontent.com/DFE-Digital/rails-template/source-path-templates/template.rb