In my rails app I have teams and staff of which staff are members of a team. Both objects have ordinals which I want to sort by ascending.
How do I do this? I tried:
@teams = Team.all.order('"teams"."ordinal" asc, "staffs"."ordinal" asc')
But it didn't work... and gives me the error:
SQLite3::SQLException: no such column: staffs.ordinal: SELECT "teams".* FROM "teams" ORDER BY "teams"."ordinal" asc, "staffs"."ordinal" asc