What's the easiest way to replace the * .erb file?

Hello!

for example

discourse/app/views/list/list.erb

I created this file in the plugin: text/app/views/list/list.erb (And I copied the contents of the original file there)
In the file: plugin.rb

Need to specify a connection?

enabled_site_setting :text_enabled
load File.expand_path('../app/views/list/list.erb', __FILE__)

Unfortunately, I did not find how to do it.

There is prepend_view_path method:
http://api.rubyonrails.org/classes/ActionView/ViewPaths/ClassMethods.html#method-i-prepend_view_path

2 Likes