Sha256: 198fbe5b3291a377b2dce0fc0446e36b0bf0088f49cde67325efd2edf33b1c09

Contents?: true

Size: 534 Bytes

Versions: 6

Compression:

Stored size: 534 Bytes

Contents

# In Rails 4.1 and above, visit:
# http://localhost:3000/rails/mailers
# to see a preview of the following 3 emails:

class EffectivePostsMailerPreview < ActionMailer::Preview
  def post_submitted
    EffectivePosts.mailer_class.post_submitted(build_preview_post)
  end

  protected

  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

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
effective_posts-2.7.2 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.7.1 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.7.0 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.6.2 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.6.1 lib/generators/templates/effective_posts_mailer_preview.rb
effective_posts-2.6.0 lib/generators/templates/effective_posts_mailer_preview.rb