Ask A Question

Notifications

You’re not receiving notifications from this thread.

Forum Series Part 5: Email Notifications with Rails 4.2, deliver_later, and Previews Discussion

Innokenty Longway Innokenty Longway

Thanks for sharing this. Didn't know about it.

Reply

I have no audio from 10:05 to 11:05. Is that an issue with the screencast or just a particularly reflective section? :)

Reply

Well shoot. That's definitely missing audio. I may not have the original audio to get that fixed unfortunately. Looks like I'm just explaining that you can set the anchor and your emails can link to and highlight the specific element on the page when you click the link.

Reply

We can no longer use `deliver_now` or `deliver_later` with preview as it will throw an Net::OpenTimeout error. "Methods must return a Mail::Message object which can be generated by calling the mailer method without the additional deliver." http://api.rubyonrails.org/...

Reply

Very good to know! Thanks @Marklar

Reply

What should you do instead now?

Reply
Kohl Kohlbrenner Kohl Kohlbrenner

@excid3:disqus in the send notifications method, could you sub current_user for user when subtracting from the unique list? Does [user] reflect :user in belongs_to :user relationship?

Reply

Yes it does. It's basically creating an array with one item in it and that item is the User from the belongs_to relationship. You can't do "current_user" because it's a method that's only available in the controllers and views. In the model here, we only have access to the current ForumPost record and it's associations.

Reply

Hi oliver I just installed sucker_punch so that my email should deliver later... but three days passed not delivered.. By deliver now.... it always delivered... Am I missing something???

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.