to_json:include:order?

时间:2010-10-28 01:15:46

标签: ruby-on-rails

是否可以订购包含的型号?

format.json {render:json => @ client.to_json(:include => {:videos => {:order =>'sortorder'}}}}

1 个答案:

答案 0 :(得分:-1)

您需要在创建@client时进行。在您的SQL请求中