4
我正在使用RABL来格式化Rails API的输出。我想下面的代码在rabl中渲染partials
message.rabl:
object @message
attributes :id,:description,:created_at,:created_by_user_id
child @comments do |t|
partial("user/comment", :object => @comments)
end
comments.rabl:
object @comments
attributes :comment_body
我的问题是,我不message.rabl渲染我的部分即comments.rabl。在rabl中渲染偏色的正确方法是什么?谢谢。