Hello there ! I'm building an app where there are different institutions, and those institutions can declare (and edit later, of course) to what kind of public they're aimed (there're several discriminants like age, incomes, etc). Each time a visitor fills in her information, I need to check which(s) institution(s) is (are) a match, based on the aforementioned discriminants. How would you model the matching side of it?
Institutions have_many conditions, where conditions is a model having as attrs discriminant, operator:string and value ?
kitsuneyo If you as a person fill a form, you need to give age, incomes, status and other data. Then, institutions want to accept people based on criteria (younger than 35, minimum of 100 £ and maximum of 1,200 £ of income, working, etc., etc.). I'm struggling as to how to model the construction of those conditions in the institution side (defined by institution employees, so users): lot of columns with criteria, a condition model to build
hello there ! question: how'd you parse a sort param like "-updated_at" so you could do like scope.sort(updated_at: :desc) or scoped.sort(updated_at: -1)? Something built-in I'm missing? Thanks !