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() click to toggle source
# File lib/generators/templates/effective_posts_mailer_preview.rb, line 6
def post_submitted
  EffectivePosts.mailer_class.post_submitted(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',
    body: 'This is a new post that has been submitted by a public user.'
  )
end