<%= m.members %>
这会在下面返回这个数组。如果我只想获取这个数组的最后一行(Ray 的记录),我该如何编码?
[#<User id: 4, username: "John", age: 27, deleted_at: nil>,
#<User id: 8, username: "Mike", age: 27, deleted_at: nil>,
#<User id: 13, username: "Ray", age: 27, deleted_at: nil>]
<%= m.members %>
这会在下面返回这个数组。如果我只想获取这个数组的最后一行(Ray 的记录),我该如何编码?
[#<User id: 4, username: "John", age: 27, deleted_at: nil>,
#<User id: 8, username: "Mike", age: 27, deleted_at: nil>,
#<User id: 13, username: "Ray", age: 27, deleted_at: nil>]