Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It should be possible to iteratively add recipients to an email #14

Open
esquivalient opened this issue Aug 22, 2023 · 0 comments
Open

Comments

@esquivalient
Copy link
Member

(rdbg) itme.recipients << "tony@expectedbehavior.com"    # ruby
eval error: EmailUser(#17760) expected, got "tony@expectedbehavior.com" which is an instance of String(#3440)
  /Users/esquivalient/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/associations/association.rb:299:in `raise_on_type_mismatch!'
  /Users/esquivalient/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/associations/has_many_through_association.rb:17:in `block in concat'
  /Users/esquivalient/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/associations/has_many_through_association.rb:16:in `each'
  /Users/esquivalient/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/associations/has_many_through_association.rb:16:in `concat'
  /Users/esquivalient/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/associations/collection_proxy.rb:1032:in `<<'
  (rdbg)//Users/esquivalient/Dropbox/code/burndown/test/models/invite_team_member_email_test.rb:1:in `block in <class:InviteTeamMemberEmailTest>'
nil

doesn't work, but

(rdbg) itme.recipients = ["tony@expectedbehavior.com"]    # ruby
[#<ActiveMailer::EmailUser:0x000000010efb6558
  id: 9,
  email_address: "tony@expectedbehavior.com",
  created_at: Thu, 04 Aug 2022 19:34:23.486894000 UTC +00:00,
  updated_at: Thu, 04 Aug 2022 19:34:23.486894000 UTC +00:00>]
(rdbg)

does. That's a needless paper cut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant