Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.