I have a method call:
def group
render :json => Group.find(params[:id])
end
Which renders:
{
id: 1,
name: "Name Here",
description: "Description Here",
created_at: "2014-11-24T19:10:53.609Z",
updated_at: "2014-11-24T19:10:53.609Z"
}
I would like to also append a custom attribute the the group model being rendered. For example I'd like the group JSON to include an attribute message : "Hello World"
How can I do this?