的響應特定的字段我有一個像限制在軌道控制器
def index
@videos = Video.all.to_a
respond_to do |format|
format.xml { render :xml => @videos }
format.json { render :json => @videos }
end
end
視頻控制器操作有屬性name
和title
。
我想返回XML只包含title
。
如何從響應中限制它。
同時,我不相信你所需要的:所有在此查詢 – Jon