You can do something like this in the controllers:
respond_to do |format|
format.html { render handlers: [:slim] }
end
Or if you want to override it specifically for one view:
render "path/view", handlers: [:slim]
Pergunta
I am semi-forking Redmine for my company and rarely pulling improvements from upstream. I prefer to use SLIM over ERB for views. My idea is that I want to keep erb files intact for the sake of easier diff-ing when I pull changes from upstream, still I want to only use SLIM versions of the templates. So where I have
index.html.erb
and
index.html.slim
I want Rails to only search for index.html.slim and take no notice about the existence of the erb variant. Is it possible to make the two variants coexist side-by-side in the same folder and only use SLIM here?
Solução
You can do something like this in the controllers:
respond_to do |format|
format.html { render handlers: [:slim] }
end
Or if you want to override it specifically for one view:
render "path/view", handlers: [:slim]