3 ms·
Exactly it seems like you could replace all this code with: send("#{group.type}_notification") or its python equivalent. Maybe a hash table with strings as ke
by fleitz 11y ago
Exactly it seems like you could replace all this code with:
send("#{group.type}_notification") or its python equivalent.
Maybe a hash table with strings as keys and functions as values for a less 'scripty' language.
Perhaps I'm thinking the variable group is of type group, but it also looks like it suffers from poor separation of concerns... eg. Why are groups sending email?
Probably also a good candidate for guards instead of nested ifs