-
Notifications
You must be signed in to change notification settings - Fork 323
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
Refactor Mail Helper Array Assignments #95
Comments
Thanks for opening this. Something like the above would be what I would suggest. This should be done in concert with adding deprecation warnings to the existing setter methods, or at least signal that they do not work as standard setter methods. |
While looking at another issue I noticed that the default checks in all of the array assignments. There is a bit of idiomatic Ruby used to wrap this Additionally, because Applying this both in the case of attachments, it looks like this: def add_attachment(attachment)
attachments.push(attachment.to_json)
end
def attachments
@attachments ||= []
end The Then, in |
Loving the feedback @swifthand! Could you please fill out this form so we can send you some swag? |
@thinkingserious Gladly! Also saw the link to the Mail Helper project. I haven't used Github's new project feature before but I'll give it a look. Does this issue fall under that as well or are these array assignments best addressed separately? |
Hi @swifthand, I think this issue belongs in the Mail Helper project. I'm not quite sure how to best manage that yet, we are new to the Projects feature too, kicking the tires. My guess is that we will swarm on the requirements, agree on a scope of work, break up the tasks into issues and add them to the project's backlog. |
Hello Everyone! Please follow progress here: #86 Thanks! |
This issue comes from Twitter: https://twitter.com/mootpointer/status/776305972339838976
Reference code: https://github.com/sendgrid/sendgrid-ruby/blob/master/lib/sendgrid/helpers/mail/mail.rb#L864
should be:
This is true for all cases where we assign to an array in the Mail Helper.
Technical details:
The text was updated successfully, but these errors were encountered: