tosdr / edit.tosdr.org

👍👎 A new web app to rate services
https://edit.tosdr.org
GNU Affero General Public License v3.0
212 stars 37 forks source link

'Case' the database model messes with ruby's case/when syntax #1049

Open madoleary opened 3 years ago

madoleary commented 3 years ago

Right now it's not possible to write 'case' in reference to the model without tripping over ruby's case/when syntax. If you write 'case' to declare a variable in reference to the case model, ruby expects the 'when' follow-up, and will throw an error. This will likely pose problems for object fabrication during unit tests, where, for example, a 'case' object ought to be nested inside of a point using the same name that it has in the database.