varvet / godmin

Admin framework for Rails 5+
http://godmin-sandbox.herokuapp.com
MIT License
486 stars 47 forks source link

Add appraisal for Rails 6 and fix failing Resolver #248

Closed johanhalse closed 5 years ago

johanhalse commented 5 years ago

We've been bitten by a change to ActionView::FileSystemResolver. I think it's this one https://github.com/rails/rails/commit/cc9a0de6602f3c33e5ffa168c75f90451b47a208 but it doesn't really matter. What it boils down to is the Rails 6 FileSystemResolver no longer uses find_templates. That means we have to find some other way of looking for our templates.

My solution is to hook into the _find_all function and do basically the same thing as before. It's a private method so we're treading on thin ice again, but it has the advantage of not being run by the pre-Rails 6 code which means we can just add that function and leave well enough alone.

jensljungblad commented 5 years ago

Nice job! I think it should be fine as long as the tests pass. If I remember correctly we have integration tests for this.