Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: Compatibility with Discourse on Rails 6.1 (#14)
Related to discourse/discourse#12688. Rails 6.1 changes the initializer of `ActionView::Base` to require 3 arguments. Instead of creating the instance ourselves, we can use the [`ActionView::Base.with_view_paths`](https://github.com/rails/rails/blob/c5929d5eb55b749bc124b3ccc2d79323d015701f/actionview/lib/action_view/base.rb#L229-L231) method that gives us an instance with whatever view paths we need. The `with_view_paths` method is available in Rails 6.0.3.5 (Discourse's current Rails version), so this change is backward compatible.
- Loading branch information