【发布时间】:2013-04-19 06:59:35
【问题描述】:
型号
def to_json
p 'ppp'
p UNDISPLAYABLE_SIGNS
if sign.in? UNDISPLAYABLE_SIGNS
{code: code}
else
super
end
end
控制器
render json: {currency: @currency, savedInUser: true}
服务器控制台中没有打印 ppp,我该如何自定义我的 JSON 响应,我做错了什么?
【问题讨论】:
标签: ruby-on-rails json