class EffectivePostsMailerPreview
In Rails 4.1 and above, visit: localhost:3000/rails/mailers to see a preview of the following 3 emails:
Public Instance Methods
post_submitted_to_admin()
click to toggle source
# File lib/generators/templates/effective_posts_mailer_preview.rb, line 6 def post_submitted_to_admin Effective::PostsMailer.post_submitted_to_admin(build_preview_post) end
Protected Instance Methods
build_preview_post()
click to toggle source
# File lib/generators/templates/effective_posts_mailer_preview.rb, line 12 def build_preview_post post = Effective::Post.new( title: 'An example post', category: EffectivePosts.categories.first.presence || 'posts', published_at: Time.zone.now, draft: true, body: 'This is a new post that has been submitted by a public user.' ) end