Closed nagano564 closed 6 years ago
@nagano564 I rewrote the test because I discovered that running a .count on the ActiveRecord relation after the geo-query causes the query to break (appeared to be a table alias related to the Geocoder gem).
Before we reconvene, make sure you git pull the last commit I pushed and then 'git fetch upstream' and rebase it with master. @hpjaj added a constant for the 'community leader' tag and a has_tag? method on User model.
Also looks like CI turned up a couple errors. You can click the Travis CI link above, and search for "errors" to see the issues.
You can also run make test
locally, to see the errors.
@hpjaj We were just checkpointing it earlier today since we had to work on other things. Currently pairing on slack's screenhero right now, adding more tests for UserMailer right now.
Should we send each leader a email individually
Or have one email sent to all leaders in the area if we send it this way should we worry about having all the emails on the BCC line so other leaders can't see each others email addresses in the to line.
@hpjaj this is ready for review whenever you get a chance, and also wondering if we want to change the mailer implementation per @nagano564 's latest comment.
This looks good!
Should we send each leader a email individually
Yes.
We need a rake
task to initially tag the appropriate users in prod with the community leader tag. This would involve:
rake
taskWould you like to include that as part of this PR and issue? Or create a new issue and PR for it?
Creating a separate issue for the rake
task.
Description of changes
This should send an email to leaders if a new user signs up within 50 miles of the leader
Issue Resolved
Fixes #37