0
我想在視圖中執行兩個輔助函數,第一個返回第一個。我知道下面的功能正常返回所需的哈希:流中的多個JSON對象
%p = helper_method0 params[:some_string] #does a request on a third party site which responds with json data wich is then parsed by yajl and the hash is returned to view
然而,當我打電話以下幾點:
- hash = helper_method0 params[:some_string] #does a request on a third party site which responds with json data wich is then parsed by yajl and the hash is returned to view
%p= helper_method1 hash #Literally is just returning the input parameter
我收到以下錯誤消息
Found multiple JSON objects in the stream but no block or the on_parse_complete callback was assigned to handle them.
如何調用方法與輸入參數作爲從視圖中的另一種方法的返回?