liquid-rails icon indicating copy to clipboard operation
liquid-rails copied to clipboard

How to change default path of templates directory?

Open sdilshod opened this issue 6 years ago • 3 comments

Hi @radin-reth

I hold my templates in app/templates and when attempt to include partials inside that directory i'm getting error about "No such template 'v14/html/shared/region_select'" .

Is there way to change default template location?

thanks

sdilshod avatar Jun 28 '18 07:06 sdilshod

Maybe you have to tell rails what path you are looking for: let's try this prepend_view_path

class ArticlesController < ApplicationController
    prepend_view_path 'app/views/my_custom_theme_dir'
    ...
end

radinreth avatar Jun 28 '18 16:06 radinreth

I forked this repo and change source code. It have Railtie and i'm not find other solutions then editing source code. My templates are in the directory app/templates and how can i see source code of this gem included path app/views. My project in rails 4

sdilshod avatar Jun 29 '18 06:06 sdilshod

Sorry for late reply, I think gem thems_on_rails can solve your problem, Feel free to try it.

radinreth avatar Jul 03 '18 14:07 radinreth