MonoRail Select Using Enum
问题 I've been following this guide and coming up with my own concoction in order to use MonoRail's FormHelper.Select that is generated from an enum. So here's the Brail syntax: ${FormHelper.Select("user.Role", ${LS.EnumToPairs(Roles)}, {"value":"First", "text":"Second"})} "LS" is just my own helper, which I've defined as follows: public IEnumerable<Pair<int, string>> EnumToPairs(Type e) { IList<Pair<int, string>> pairs = new List<Pair<int, string>>(); foreach (int val in Enum.GetValues(e)) pairs