jhawthorn / actionview_precompiler

Precompiles ActionView templates at app boot for Rails 6+
MIT License
144 stars 11 forks source link

Include the filename of the template that called render #27

Closed HParker closed 3 weeks ago

HParker commented 3 years ago

This allows actionview_precomiler to resolve templates that would have otherwise could be confused with other templates

having,

render 'profile'

in template users/index.html.erb will resolve to the template users/_profile but if the same render call is in the file authors/index.html.erb it should resolve to the template authors/_profile.html.erb

The previous tests where also updated to include the filename, but they are not used. Instead they are given names that seem to "make sense," but don't effect the template that the render call resolves to.