How to override erb with liquid?

ぐ巨炮叔叔 提交于 2019-12-06 03:36:35

Do you have a liquid template handler? Otherwise Rails won't know what you want to do with .liquid files. See this blog post: http://royvandermeij.com/blog/2011/09/21/create-a-liquid-handler-for-rails-3-dot-1/

For your second question: not using a theme for app/views/admin/* you should make sure you have an AdminController that does not prepend_view_path.

According to the documentation you can use prepend_view_path

Add the following to your ApplicationController:

before_filter :set_theme_path

def set_theme_path
  prepend_view_path "app/themes/#{current_theme}"
end

So Rails should then look for any views in your theme specific directory in preference to the default views in app/views/**/*

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!