Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Why wasn't ActionMailer::Preview, introduced in Rails 4.1, not used to preview the successful delivery of emails?

Hi, Jason Seifer:

In the Email w/ Rails portion of the Blank Slates in Ruby on Rails course, Jason stated there's no good way to test or see the successful output of an email delivered by Rails.

But with Rails 4.1, that's been false for some time through ActionMailer::Preview:

In fact, all the successful emails using ActionMailer::Previews by default go to"#{Rails.root}/spec/mailers/previews"

Will there be a workshop video or a similar follow-up video addressing this if the videos produced for the course were at a time when Rails 4.1 wasn't stable enough for TeamTreehouse to leverage its features towards making more awesome Rails apps?

I think it's critical for beginners to leverage this new feature within Rails, and it's new enough it's of extreme value of seeing it used through a project to align well with the project-based approach of Team Treehouse does with the majority of courses on Treehouse Island.

1 Answer

David Gross
David Gross
19,443 Points

I think they show you how to use ActionMailer::Preview in upgrading rails to 4.1 workshop.

I'll look into it, thanks.

That said, the app is also a Rails 4.1 application: It's a bit puzzling to not use ActionMailer::Preview and state essentially (seemingly) there isn't really a good way to preview the contents of the email when that's one of the core new features of Rails 4.1.

Then again, that particular stage didn't address testing the contents of the email using the rspec email gem Jason Seifer went over with a Rails 4.0 app before for a course.