【发布时间】:2017-04-05 14:35:07
【问题描述】:
我正在使用 gem 'jbuilder_cache_multi' 来缓存我的 json 响应。当我从我的 ios 本机应用程序中访问我的 api 时,我遇到了一个奇怪的错误。以下是我得到的错误:
ActionView::Template::Error (singleton can't be dumped):
2:
3: json.orders do
4: json.cache! ['v1', I18n.locale, @orders] do
5: json.cache_collection! @orders, key: ['v1', I18n.locale] do |order|
6: json.partial! 'order', order: order
7: end
8: end
app/views/api/v1/orders/index.json.jbuilder:5:in `block (2 levels) in
请求是:
Started GET "/api/v1/orders?page=2&q%5Bmerchant_id_eq%5D=1&q%5Bs%5D=created_at+asc&q%5Bstate_not_in%5D%5B%5D=composing&q%5Bstate_not_in%5D%5B%5D=distributed&q%5Bstate_not_in%5D%5B%5D=canceled"
任何人都可以在这方面提供帮助。谢谢
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-4