【发布时间】:2010-04-21 00:13:18
【问题描述】:
我尝试使用 Liquid 模板引擎插件,但在控制器尝试渲染 .liquid 模板时出现以下错误。
"LiquidView:Class 的未定义方法 `call'"
product_controller.rb
@product = Product.find(:first)
渲染 :layout=> false, :template=> "product/show.liquid"
product/show.liquid
产品名称:{{product.name}}
价格:{{product.price}}
我根据插件安装了它 http://wiki.github.com/tobi/liquid/getting-liquid-to-work-in-rails
我使用 Rails 2.3.5 和 Ruby 1.8.7。
以前有人遇到过同样的问题吗?
【问题讨论】:
-
似乎在 Rails 上使用液体有问题 >= 2.3.4 请参阅 groups.google.com/group/liquid-templates/browse_thread/thread/… 但我仍然无法使其工作!
标签: ruby-on-rails liquid