2016-05-02 5 views
0

私はjson応答をキャッシュするためにgem 'jbuilder_cache_multi'を使用しています。私は私のiosネイティブのアプリから私のAPIをヒットするときに私は奇妙なエラーが発生しています。以下は、私が得たエラーは次のとおりです。ActionView :: Template :: Error(シングルトンはダンプできません)

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" 

誰もがこの点で助けることができます。ありがとう

答えて

1

返すフィールドの1つはnilです。 to_sが必要です。親切に値を調べてください。

関連する問題