开源雷达国内 GitHub 镜像站
加速通道已就绪 返回列表
全部项目

atomicobject/to_api

Instead of to_xml and as_json, simply implement to_api. Return an unformatted hash. Let the model understand the data. Let the controller understand the format. In Rails, the controller can simply call render :xml => model.to_api or render :json => model.to_api.

语言:Ruby · GitHub 星标:16 · Fork:2

在 GitHub 上查看原仓库

正在读取项目信息…