Nếu tôi có một hàm trả về này:Viết một hàm làm JSON bằng Yard?
render :json => @orders.as_json(include: [{:user => {only: :id}}], :only => [:id, :status_id])
Tôi ghi lại nó như thế này:
# @return [JSON] includes the id, the order status id and the id of the associated user
tôi tự hỏi nếu có một cách tốt hơn của tài liệu như thế nào JSON trở lại sẽ trông giống như .
Bạn có tìm thấy cách nào tốt hơn không? – josal