Using backgrid, displaying users list. 'User' model having first_name and last_name attributes. I have wrote method full_name on user model and displaying that full name into backgrid.
{
name: "full_name",
label: "Name",
editable: false,
cell: 'string'
}
On server side using will_pagination. When I clicks on full_name to sort. It gives error - "ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR: column "full_name" does not exist".
So I need to sort on first_name instead of full_name. But I don't know how to do? Any suggestions?