我正在尝试找到一种方法来使美味派返回的结果与默认结果略有不同。例如,默认情况下,api 返回以下内容:
{
created_at: "2011-10-18T14:22:27",
email_address: "paul.mccartney@beatles.com",
first_name: "Paul",
id: 1,
is_active: true,
is_super_admin: true,
last_login: "2011-10-18T14:22:27",
last_name: "McCartney",
resource_uri: "/api/v1/user/1/",
updated_at: "2011-10-18T14:22:27",
username: "pmc"
}
我想用be替换first_name
and 。是否可以覆盖模型字段?如果是这样 - 怎么做?last_name
full_name
Paul McCartney