Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一个动作来返回一个Array(稍后将由中间件处理)。
Array
但是,这总是将返回值转换为字符串:
def logs # logic here [1, 2, 3] end
如何告诉 Espresso 按原样退回?
好问题。
并且有一个很好的答案:)
使用response.body二传手:
response.body
def logs # logic here response.body = [1, 2, 3] end