emachnic
2014-Sep-22 16:44 UTC
Sending mail from model using `self` and GlobalID in Rails edge
I wanted to see if the following is reproducible and possible a bug or intended behavior. I have a Meeting model that has a state machine. When a state is changed, I'd like the callback to send an email through the MeetingMailer in the background through ActiveJob. Passing `self` in the callback seems to pass the wrong URI for the GlobalID and triggers the URI::InvalidURIError. If I move the call to send the mail to the controller and pass in a meeting object then everything works fine. Maybe I'm not understanding how GlobalID is used but I wanted to know if anyone else has tried this yet. Thanks, Evan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.