4 ms·
Yeah, it's just my opinion tempered with experience. Is the pluralization rule literally as simple as stated in the article, namely appending an 's' and callin
by jsd1982 9y ago
Yeah, it's just my opinion tempered with experience.
Is the pluralization rule literally as simple as stated in the article, namely appending an 's' and calling it done? English is rarely so simple and there are tons of corner cases which is why I tend to frown on the pluralization rules that are unpredictable. Those must be a nightmare for English-as-a-second-language folks too.
- steveklabnik 9y agoOh yeah, I remember thanks to ActiveSupport::Inflector, heh. Yes: https://github.com/diesel-rs/diesel/blob/e52d1710d98a05c3aa4663017ec47dbb40e1d747/diesel_codegen/src/model.rs#L72-L76 https://github.com/diesel-rs/diesel/blob/e52d1710d98a05c3aa4... But it also converts CamelCase to snake_case: https://github.com/diesel-rs/diesel/blob/e52d1710d98a05c3aa4663017ec47dbb40e1d747/diesel_codegen/src/model.rs#L56-L70 https://github.com/diesel-rs/diesel/blob/e52d1710d98a05c3aa4...