Phoenix and Ecto and SELECTs
问题 I have an association set up in Ecto models in Phoenix. An Organization has many OrganizationMembers. In the OrganizationMember controller's Edit method, I'm trying to create a SELECT element that will hold all of the Organizations to choose from. In the edit definitiion, I've got the following two lines: # organizations = Enum.to_list(from(o in Organization, order_by: o.name, select: [o.name, o.id])) organizations = from(o in Organization, order_by: o.name, select: {o.name, o.id}) This is my